mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
NgIf syntax has been extended to support else clause to display template
when the condition is false. In addition the condition value can now
be stored in local variable, for later reuse. This is especially useful
when used with the `async` pipe.
Example:
```
<div *ngIf="userObservable | async; else loading; let user">
Hello {{user.last}}, {{user.first}}!
</div>
<template #loading>Waiting...</template>
```
closes #13061
closes #13297
|
||
|---|---|---|
| .. | ||
| completions_spec.ts | ||
| definitions_spec.ts | ||
| diagnostics_spec.ts | ||
| hover_spec.ts | ||
| html_info_spec.ts | ||
| template_references_spec.ts | ||
| test_data.ts | ||
| test_utils.ts | ||
| ts_plugin_spec.ts | ||