parent
661a98aeda
commit
589dd479e2
|
@ -160,12 +160,18 @@ export class NgIf {
|
||||||
this._thenTemplateRef = templateRef;
|
this._thenTemplateRef = templateRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Boolean expression to evaluate as the condition for showing a template.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
set ngIf(condition: any) {
|
set ngIf(condition: any) {
|
||||||
this._context.$implicit = this._context.ngIf = condition;
|
this._context.$implicit = this._context.ngIf = condition;
|
||||||
this._updateView();
|
this._updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A template to show if the condition expression evaluates to true.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
set ngIfThen(templateRef: TemplateRef<NgIfContext>|null) {
|
set ngIfThen(templateRef: TemplateRef<NgIfContext>|null) {
|
||||||
assertTemplate('ngIfThen', templateRef);
|
assertTemplate('ngIfThen', templateRef);
|
||||||
|
@ -174,6 +180,9 @@ export class NgIf {
|
||||||
this._updateView();
|
this._updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A template to show if the condition expression evaluates to false.
|
||||||
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
set ngIfElse(templateRef: TemplateRef<NgIfContext>|null) {
|
set ngIfElse(templateRef: TemplateRef<NgIfContext>|null) {
|
||||||
assertTemplate('ngIfElse', templateRef);
|
assertTemplate('ngIfElse', templateRef);
|
||||||
|
|
Loading…
Reference in New Issue