diff --git a/lib/src/common/directives/ng_if.dart b/lib/src/common/directives/ng_if.dart index f7e5c65df..d176ea010 100644 --- a/lib/src/common/directives/ng_if.dart +++ b/lib/src/common/directives/ng_if.dart @@ -1,20 +1,19 @@ import 'package:angular2/core.dart' show Directive, ViewContainerRef, TemplateRef; -/// Causes the element and its contents to appear in the DOM conditionally. +/// Causes an element and its contents to be added/removed from the DOM +/// conditionally, based on the value of the supplied boolean template +/// expression. /// -/// The condition is supplied as a boolean template expression. When the -/// condition changes, the UI is updated automatically. +/// See the [Template Syntax section on `ngIf`][guide] for more details. /// -/// **Example**: +/// ### Examples /// -/// -///
An occur occurred
+/// {@example docs/template-syntax/lib/app_component.html region=NgIf-1} /// -/// -/// +/// {@example docs/template-syntax/lib/app_component.html region=Template-2} +/// +/// [guide]: docs/guide/template-syntax.html#ngIf @Directive(selector: "[ngIf]", inputs: const ["ngIf"]) class NgIf { final TemplateRef _templateRef;