Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions lib/src/common/directives/ng_if.dart
Original file line number Diff line number Diff line change
@@ -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
///
/// <!-- Place directly on a DOM element -->
/// <div *ngIf="shouldShowError">An occur occurred</div>
/// {@example docs/template-syntax/lib/app_component.html region=NgIf-1}
///
/// <!-- Or use the template tag -->
/// <template [ngIf]="shouldShowError">
/// <div>An error ocurred</div>
/// </template>
/// {@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;
Expand Down