I am passing an id through a url in my angularfire2 app and collecting it in the onInit method
ngOnInit() {
// subscribe to router event
this.activatedRoute.params.subscribe((params: Params) => {
this.groupId = params['groupId'];
// grab specific group
this.group = this.af.database.object('/groups/'+this.groupId);
this.group.subscribe(console.log);
});
}
the console.log shows perfectly the object I want but I can't then display it the HTML with {{group.data}} instead I get the string [object Object].
I get the same result using a list observable too but in the console log I get a bunch of arrays of the data I want instead of 1 object so an object would be preferable if possible.
What do I have to do to be able to display the data?
data. This issue can't be accurately diagnosed without knowing what that looks like. Ifdatais a list-like object, for example, then the answer is different than ifdatais a simple key value pair.