diff --git a/packages/core/src/metadata/directives.ts b/packages/core/src/metadata/directives.ts index 45e9fe2669..441eea8b37 100644 --- a/packages/core/src/metadata/directives.ts +++ b/packages/core/src/metadata/directives.ts @@ -136,6 +136,7 @@ export interface Directive { * id: string; * * ``` + * */ inputs?: string[]; @@ -170,6 +171,7 @@ export interface Directive { * class MainComponent { * } * ``` + * */ outputs?: string[]; @@ -201,6 +203,7 @@ export interface Directive { * class MainComponent { * } * ``` + * */ exportAs?: string; @@ -436,6 +439,67 @@ export interface ComponentDecorator { * * ``` * + * ### Preserving whitespace + * + * Removing whitespace can greatly reduce AOT-generated code size and speed up view creation. + * As of Angular 6, the default for `preserveWhitespaces` is false (whitespace is removed). + * To change the default setting for all components in your application, set + * the `preserveWhitespaces` option of the AOT compiler. + * + * By default, the AOT compiler removes whitespace characters as follows: + * * Trims all whitespaces at the beginning and the end of a template. + * * Removes whitespace-only text nodes. For example, + * + * ``` + * + * ``` + * + * becomes: + * + * ``` + * + * ``` + * + * * Replaces a series of whitespace characters in text nodes with a single space. + * For example, `\n some text\n` becomes ` some text `. + * * Does NOT alter text nodes inside HTML tags such as `
` or `