export directive NgIf
export directive NgIf
exported from angular2/common defined in angular2/src/common/directives/ng_if.ts (line 2)
Removes or recreates a portion of the DOM tree based on an {expression}.
If the expression assigned to ngIf
evaluates to a false value then the element
is removed from the DOM, otherwise a clone of the element is reinserted into the DOM.
Example (live demo):
Syntax
<div *ngIf="condition">...</div>
<div template="ngIf condition">...</div>
<template [ngIf]="condition"><div>...</div></template>
Selectors
[ngIf]
Inputs
ng-if
bound to NgIf.ngIf
Constructor
constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef)
constructor(_viewContainer: ViewContainerRef, _templateRef: TemplateRef)
Not Yet Documented
Members
ngIf
ngIf
Not Yet Documented