SapphireDb logo SapphireDb

Changes

You can observe the changes of a collection by calling the method .changes()

\f:(typescript:Angular) export class DemoComponent implements OnInit {\n \tchanges$: Observable<any[]>;\n\n \tconstructor(private db: SapphireDbService) { }\n\n \tngOnInit() {\n \t\tthis.changes$ = this.db.collection('demo.entries').changes().pipe(\n \t\t\tfilter(v => v.responseType !== 'QueryResponse'),\n \t\t\tscan((arr, v) => [...arr, v], [])\n \t\t);\n \t}\n }

Changes

Values

[]

This website uses Google Analytics. If you want to disable it just unselect the option: