I am getting data and appending data to the same node as part of a subscription. How can I avoid endless loop?
this.af.database.list('objects/').subscribe(x=>{ / the subscription is only needed once this.af.database.list('objects/').push({newobject: ''}; };
Kill me if I'm wrong or not, but I believe you can use the method first() :
first()
this.af.database.list('objects/').first().subscribe(x=>{ this.af.database.list('objects/').push({newobject: ''}; };