Please let me know what I am doing wrong. The notes seem to show you can access the properties of an object in this way but that is on a FirebaseListObservable rather than a FirebaseObjectObservable so I am not sure how to do it.
In constructor:
this.update = af.database.object('/webTest/update');
In View:
{{ update | async | json}}
{{ update.pemdos | async }}
The first on outputs the json:
{ "asdf": 1234, "fdsa": "rewq", "pemdos": "asdf" }
The second is blank.
The full code can be found:
https://github.com/dcunited08/firebase-test/blob/angular2/src/app/firebase-test.component.ts
https://github.com/dcunited08/firebase-test/blob/angular2/src/app/firebase-test.component.html
You should be using the async pipe before trying to output any properties.
{{ (update | async)?.pemdos }}
The ? is an example of using the elvis operator which you can read more about here.
@rosslavery Thank you for the assistance.
Most helpful comment
You should be using the
asyncpipe before trying to output any properties.The
?is an example of using the elvis operator which you can read more about here.