I am trying to figure out where everything's gone wrong. All my observables return [object Object].
My sunshine.component.html
<h4>Welcome {{username$}}</h4>
<ul>
<li *ngFor="let addsnote of addsnotes$ | async">{{ addsnote }}</li>
</ul>
My sunshine.component.ts
import { Component, OnInit, Injectable } from '@angular/core';
import { FormGroup, FormControl } from '@angular/forms';
import { AngularFire, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2';
export class ProfileComponent implements OnInit {
private addsnotes$: FirebaseListObservable<string[]>;
private username$: FirebaseObjectObservable<string>;
private profileshow = false;
addForm: FormGroup;
constructor(private af: AngularFire){
this.addForm = new FormGroup({
'addnote': new FormControl()
});
}
ngOnInit(){
let user = firebase.auth().currentUser,
userNamePath = `users/${user.uid}/username`,
notesPath = `users/${user.uid}/addnote`;
this.username$ = this.af.database.object(userNamePath);
this.addsnotes$ = this.af.database.list(notesPath);
}
addSubmit(){this.addsnotes$.push('Billy Dee Williams');}
}
Portions of my Firebase database
{
"users" : {
"4twiyaFxVmaESXGWIfW4BwRXh893" : {
"addnote" : {
"-KSmWtpUSFXPCL4O3aKr" : "Do the dishes"
},
"useremail" : "[email protected]",
"username" : "majic"
},
"PYuSE6zyAENdKREZGTHm5VH1DXn1" : {
"addnote" : {
"-KSoZM7sH6X5ahMq7S5y" : "Du the dishes",
"-KSoZMimZzm6ZGQowmuL" : "Du the dishes",
"-KSouEXkc1UkyISGTCHd" : "Du the dishes"
},
"useremail" : "[email protected]",
"username" : "asdasd"
}
}
}
A screenshot of my page (for the sake of clarity)
EDIT I have included a repo of my ongoing project here, so as to provide you all with as much info as possible. Hopefully it's useful.
https://github.com/emjayweb/demo
The respective files are in src/app/profile/profile.component. As this is completely WIP, please don't fuss about the logistics of it (guard routing, validation, etc).
The way this works is you enter some dummy data on the home page Create Account, then click on the Profile link on the navigation. You will probably have to refresh the page first. When you click on the button in the Profile route, you enter 'Billy Dee Williams' to your addnote array, and the view should reflect that.

| asyncin the title as well, as FirebaseObjectObservable is also an async observable that needs to be unwrapped:<h4>Welcome {{username$ | async}}</h4>. We're working on some ways to make this simpler with directives.[object Object]issue unfortunately. I remain puzzled as to why this is happening.