The way you are accessing items
seems to me like it is always going to return Firebase’s /Items
. If you want greater control over that, I would suggest losing the AsyncPipe
and instead subscribing and updating a controller property that you manage yourself.
Some other things:
- please get rid of all instances of
any
- it seems weird that you have both AngularFire and direct
firebase
access - date-fns > moment
- having both
formControlName
and[(ngModel)]
is also weird - declaring
Camera
in a page’sproviders
is inefficient, because it gets built up / torn down per page - do not store
Loading
in properties - it enables reuse bugs const
is less than worthless- there is no need for direct DOM access (
document.getElementById()
) - never type the word “function” inside of one
- always prefer
let
overvar
- I don’t understand how
getTotal()
is intended to be used, but as written it is incorrectly named. Nothing namedgetXXX()
should modify state. - forms cannot nest