From 589dd479e279fffd08261ba46b45dd681c2ac88c Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Mon, 21 Jan 2019 09:45:50 -0800 Subject: [PATCH] docs: add input docs (#27376) PR Close #27376 --- packages/common/src/directives/ng_if.ts | 9 +++++++++ 1 file changed, 9 insertions(+) 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);