Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit fb7804b

Browse files
committed
NgIf API doc update
1 parent f3cf5ea commit fb7804b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

lib/src/common/directives/ng_if.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import '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"])
1918
class NgIf {
2019
final TemplateRef _templateRef;

0 commit comments

Comments
 (0)