diff --git a/packages/common/src/directives/ng_if.ts b/packages/common/src/directives/ng_if.ts index 8f72a53e08..4d9f63ddce 100644 --- a/packages/common/src/directives/ng_if.ts +++ b/packages/common/src/directives/ng_if.ts @@ -160,12 +160,18 @@ export class NgIf { this._thenTemplateRef = templateRef; } + /** + * The Boolean expression to evaluate as the condition for showing a template. + */ @Input() set ngIf(condition: any) { this._context.$implicit = this._context.ngIf = condition; this._updateView(); } + /** + * A template to show if the condition expression evaluates to true. + */ @Input() set ngIfThen(templateRef: TemplateRef|null) { assertTemplate('ngIfThen', templateRef); @@ -174,6 +180,9 @@ export class NgIf { this._updateView(); } + /** + * A template to show if the condition expression evaluates to false. + */ @Input() set ngIfElse(templateRef: TemplateRef|null) { assertTemplate('ngIfElse', templateRef);