This repository was archived by the owner on Sep 16, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
lib/src/common/directives Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 11import 'package:angular2/core.dart'
22 show Directive, ViewContainerRef, TemplateRef;
33
4- /// Causes the element and its contents to appear in the DOM conditionally.
4+ /// Causes an element and its contents to be added/removed from the DOM
5+ /// conditionally, based on the value of the supplied boolean template
6+ /// expression.
57///
6- /// The condition is supplied as a boolean template expression. When the
7- /// condition changes, the UI is updated automatically.
8+ /// See the [Template Syntax section on `ngIf`][guide] for more details.
89///
9- /// **Example**:
10+ /// ### Examples
1011///
11- /// <!-- Place directly on a DOM element -->
12- /// <div *ngIf="shouldShowError">An occur occurred</div>
12+ /// {@example docs/template-syntax/lib/app_component.html region=NgIf-1}
1313///
14- /// <!-- Or use the template tag -->
15- /// <template [ngIf] ="shouldShowError">
16- /// <div>An error ocurred</div>
17- /// </template>
14+ /// {@example docs/template-syntax/lib/app_component.html region=Template-2}
15+ ///
16+ /// [guide] : docs/guide/template-syntax.html#ngIf
1817@Directive (selector: "[ngIf]" , inputs: const ["ngIf" ])
1918class NgIf {
2019 final TemplateRef _templateRef;
You can’t perform that action at this time.
0 commit comments