diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index bc88d19e0b..231a7642d3 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -471,7 +471,6 @@
/aio/content/guide/web-worker.md @angular/tools-cli @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
-
# ================================================
# @angular/core
# @angular/common (except @angular/common/http)
diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md
index f89d371650..b8db50e0a3 100644
--- a/aio/content/guide/aot-compiler.md
+++ b/aio/content/guide/aot-compiler.md
@@ -564,10 +564,25 @@ It does not, however, rewrite the `.d.ts` file, so TypeScript doesn't recognize
{@a binding-expression-validation}
## Phase 3: Template type checking
+One of the Angular compiler's most helpful features is the ability to type-check expressions within templates, and catch any errors before they cause crashes at runtime.
In the template type-checking phase, the Angular template compiler uses the TypeScript compiler to validate the binding expressions in templates.
+
Enable this phase explicitly by adding the compiler option `"fullTemplateTypeCheck"` in the `"angularCompilerOptions"` of the project's `tsconfig.json`
(see [Angular Compiler Options](guide/angular-compiler-options)).
+
-{
- "compilerOptions": { ... },
- "angularCompilerOptions": {
- "enableIvy": false
- }
-}
-
+
-AOT compilation with Ivy is faster than with View Engine, and can be used for development.
-If you opt out of Ivy, AOT compilation will be slower, and should not be used for development in large projects.
-When Ivy is disabled for a large project, make sure that the `aot` build option in that project configuration is
-set to `false` and it's only set to `true` in the `production` configuration.
+Learn more about the [Compiler](https://www.youtube.com/watch?v=anphffaCZrQ) and [Runtime](https://www.youtube.com/watch?v=S0o-4yc2n-8) in these videos from our team.
+
+
+
+
+{@a aot-and-ivy}
+## AOT and Ivy
+
+AOT compilation with Ivy is faster and should be used by default.
+In the `angular.json` workspace configuration file, set the default build options for your project to always use AOT compilation.
+
{
"projects": {
"my-existing-project": {
@@ -28,13 +25,7 @@ set to `false` and it's only set to `true` in the `production` configuration.
"build": {
"options": {
...
- "aot": false,
- },
- "configurations": {
- "production": {
- ...
- "aot": true
- }
+ "aot": true,
}
}
}
@@ -43,13 +34,53 @@ set to `false` and it's only set to `true` in the `production` configuration.
}
-Ivy projects usually contain a `postinstall` script in the `scripts` section of `package.json` that converts packages in `node_modules` to use Ivy as well.
-When you opt out of Ivy, remove this script. Remove the following line in package.json.
+## Ivy and libraries
-
+Ivy applications can be built with libraries that were created with the View Engine compiler.
+This compatibility is provided by a tool known as the Angular compatibility compiler (`ngcc`).
+CLI commands run `ngcc` as needed, either after npm installation of dependencies or when performing an Angular build.
+
+If you are a library author, you should keep using the View Engine compiler as of version 9.
+By having all libraries continue to use View Engine, you will maintain compatibility with default v9 applications that use Ivy, as well as with applications that have opted to continue using View Engine.
+
+See the [Creating Libraries](guide/creating-libraries) guide for more on how to compile or bundle your Angular library.
+When you use the tools integrated into the Angular CLI or `ng-packagr`, your library will always be built the right way automatically.
+
+{@a opting-out-of-angular-ivy}
+## Opting out of Ivy in version 9
+
+In version 9, Ivy is the default.
+For compatibility with current workflows during the update process, you can choose to opt out of Ivy and continue using the previous compiler, View Engine.
+
+
{
- "scripts": {
- "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"
- }
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "outDir": "./out-tsc/app",
+ "types": []
+ },
+ "include": [
+ "src/**/*.ts"
+ ],
+ "exclude": [
+ "src/test.ts",
+ "src/**/*.spec.ts"
+ ],
+"angularCompilerOptions": {
+ "enableIvy": false
+ }
}
+
+If you disable Ivy, you might also want to reconsider whether to make AOT compilation the default for your application development, as described [above](#aot-and-ivy). To revert the compiler default, set the build option `aot: false` in the `angular.json` configuration file.
\ No newline at end of file
diff --git a/aio/content/navigation.json b/aio/content/navigation.json
index a8975f765d..0b66da7a8c 100644
--- a/aio/content/navigation.json
+++ b/aio/content/navigation.json
@@ -576,11 +576,6 @@
"title": "CLI Builders",
"tooltip": "Using builders to customize Angular CLI."
},
- {
- "url": "guide/ivy",
- "title": "Angular Ivy",
- "tooltip": "Opting out of Angular Ivy with Angular CLI."
- },
{
"url": "guide/web-worker",
"title": "Web Workers",
@@ -712,6 +707,11 @@
"url": "guide/deprecations",
"title": "Deprecations",
"tooltip": "Summary of Angular APIs and features that are deprecated."
+ },
+ {
+ "url": "guide/ivy",
+ "title": "Angular Ivy",
+ "tooltip": "About the Angular Ivy compilation and rendering pipeline."
}
]
},