Skip to content

Commit 6b6211b

Browse files
gallotamasdavideast
authored andcommitted
Fix data binding expression in the example (angular#188)
- "item.name" is not an observable so we can't use the async pipe on it. - use the safe navigation operator to access the name property of the retrieved object.
1 parent 5ccba51 commit 6b6211b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/2-retrieving-data-as-objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import {AngularFire, FirebaseObjectObservable} from 'angularfire2';
5959
@Component({
6060
selector: 'app',
6161
template: `
62-
<h1>{{ item.name | async }}</h1>
62+
<h1>{{ (item | async)?.name }}</h1>
6363
`,
6464
})
6565
export class AppComponent {

0 commit comments

Comments
 (0)