From a9e3cbd5342f7113661d0b0bbc1ca880c34493dc Mon Sep 17 00:00:00 2001 From: Kapunahele Wong Date: Tue, 26 Nov 2019 17:21:49 -0500 Subject: [PATCH] docs: add docs about inputs and strictNullChecks to template typecheck (#34194) PR Close #34194 --- aio/content/guide/aot-compiler.md | 91 ------------- aio/content/guide/template-typecheck.md | 167 ++++++++++++++++++++++++ 2 files changed, 167 insertions(+), 91 deletions(-) diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index b8db50e0a3..daaa74001d 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -691,94 +691,3 @@ In this example it is recommended to include the checking of `address` in the `* } } ``` - -### Input setter coercion - -Occasionally it is desirable for the `@Input` of a directive or component to alter the value bound to it, typically using a getter/setter pair for the input. As an example, consider this custom button component: - -Consider the following directive: - -```typescript -@Component({ - selector: 'submit-button', - template: ` -
- ' -
- `, -}) -class SubmitButton { - private _disabled: boolean; - - get disabled(): boolean { - return this._disabled; - } - - set disabled(value: boolean) { - this._disabled = value; - } -} -``` - -Here, the `disabled` input of the component is being passed on to the `' + + `, +}) +class SubmitButton { + private _disabled: boolean; + + get disabled(): boolean { + return this._disabled; + } + + set disabled(value: boolean) { + this._disabled = value; + } +} +``` + +Here, the `disabled` input of the component is being passed on to the `