docs: changelog - fix else example (#14766)
The else syntax needs a `ng-template`.
This commit is contained in:
parent
fc9e6b2a0a
commit
bc9e1debf2
|
@ -18,7 +18,7 @@ We’ve made changes under to hood to what AOT generated code looks like. These
|
||||||
Our template binding syntax now supports a couple helpful changes. You can now use an if/else style syntax, and assign local variables such as when unrolling an observable.
|
Our template binding syntax now supports a couple helpful changes. You can now use an if/else style syntax, and assign local variables such as when unrolling an observable.
|
||||||
|
|
||||||
```
|
```
|
||||||
<div #loading>Loading...</div>
|
<ng-template #loading>Loading...</ng-template>
|
||||||
<div *ngIf="userObservable | async; else loading; let user">
|
<div *ngIf="userObservable | async; else loading; let user">
|
||||||
{{ user.name }}
|
{{ user.name }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue