I would like of increment +1 and decrement -1 in database firebase with the simple method
increment() {
const i = +1;
this.service.update(i)
}
decrement() {
const i = -1;
this.service.update(i)
}
and service I have the simple code
update(panel: Panel) {
return this.db.object(`${this.path}/${panel.codeLed}`)
.update(panel);
}