February 2017
Beginner to intermediate
294 pages
6h 9m
English
You might think, we can re-factor the onChange() method, so it can differentiate between checked and un-checked items and save only selected news. That might solve a part of the issue, but the main problem (objects being overwritten) still exists.
The solution relies on another AngularFire object called FirebaseListObservable. With the list objects we can push entries without losing the previous objects. In our previous example, we updated the code and replaced the object.set() method with the list.push() method as follows:
// src/app/collector/collector.component.ts //... import {AngularFire, FirebaseListObservable} from "angularfire2/angularfire2"; //... export class CollectorComponent { //... constructor (collectorService: ...Read now
Unlock full access