If I added subscribe on value change, how can can I unsubscribe it?
Thanks!
https://github.com/angular/angularfire2/blob/master/docs/rtdb/objects.md#retrieving-the-snapshot
`this.itemRef = db.object('item');
this.itemRef.snapshotChanges().subscribe(action => {
console.log(action.type);
console.log(action.key)
console.log(action.payload.val())
});`
//Subscribe
subscription = this.itemRef.snapshotChanges().subscribe();
//Unsubscribe
subscription.unsubscribe()
@houfu, thanks.
Most helpful comment