diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index 35b6dec4f2310..91977414c1473 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -677,6 +677,80 @@ 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 `