5 lines
12 KiB
JSON
5 lines
12 KiB
JSON
|
{
|
||
|
"id": "guide/ivy",
|
||
|
"title": "Angular Ivy",
|
||
|
"contents": "\n\n\n<div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/aio/content/guide/ivy.md?message=docs%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n</div>\n\n\n<div class=\"content\">\n <h1 id=\"angular-ivy\">Angular Ivy<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy#angular-ivy\"><i class=\"material-icons\">link</i></a></h1>\n<p>Ivy is the code name for Angular's <a href=\"https://blog.angular.io/a-plan-for-version-8-0-and-ivy-b3318dfc19f7\">next-generation compilation and rendering pipeline</a>.\nWith the version 9 release of Angular, the new compiler and runtime instructions are used by default instead of the older compiler and runtime, known as View Engine.</p>\n<div class=\"alert is-helpful\">\n<p>Learn more about the <a href=\"https://www.youtube.com/watch?v=anphffaCZrQ\">Compiler</a> and <a href=\"https://www.youtube.com/watch?v=S0o-4yc2n-8\">Runtime</a> in these videos from our team.</p>\n</div>\n<a id=\"aot-and-ivy\"></a>\n<h2 id=\"aot-and-ivy\">AOT and Ivy<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy#aot-and-ivy\"><i class=\"material-icons\">link</i></a></h2>\n<p>AOT compilation with Ivy is faster and should be used by default.\nIn the <code>angular.json</code> workspace configuration file, set the default build options for your project to always use AOT compilation.\nWhen using application internationalization (i18n) with Ivy, <a href=\"guide/i18n#merge\">translation merging</a> also requires the use of AOT compilation.</p>\n<code-example language=\"json\" header=\"angular.json\">\n\n{\n \"projects\": {\n \"my-existing-project\": {\n \"architect\": {\n \"build\": {\n \"options\": {\n ...\n \"aot\": true,\n }\n }\n }\n }\n }\n}\n</code-example>\n<h2 id=\"ivy-and-libraries\">Ivy and libraries<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy#ivy-and-libraries\"><i class=\"material-icons\">link</i></a></h2>\n<p>Ivy applications can be built with libraries that were created with the View Engine compiler.\nThis compatibility is provided by a tool known as the Angular compatibility compiler (<code>ngcc</code>).\nCLI commands run <code>ngcc</code> as needed when performing an Angular build.</p>\n<p>For more information on how to publish libraries see <a href=\"guide/creating-libraries#publishing-your-library\">Publishing your Library</a>.</p>\n<a id=\"maintaining-library-compatibility\"></a>\n<h3 id=\"maintaining-library-compatibility\">Maintaining library compatibility<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy#maintaining-library-compatibility\"><i class=\"material-icons\">link</i></a></h3>\n<p>If you are a library author, you should keep using the View Engine compiler as of version 9.\nBy 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.</p>\n<p>See the <a href=\"guide/creating-libraries\">Creating Libraries</a> guide for more on how to compile or bundle your Angular library.\nWhen you use the tools integrated into the Angular CLI or <code>ng-packagr</code>, your library will always be built the right way automatically.</p>\n<a id=\"ivy-and-universal-app-shell\"></a>\n<h2 id=\"ivy-and-universalapp-shell\">Ivy and Universal/App shell<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/ivy#ivy-and-universalapp-shell\"><i class=\"material-icons\">link</i></a></h2>\n<p>In version 9, the server builder which is used for <a href=\"guide/app-shell\">App shell</a> and <a href=\"guide/universal\">Angular Universal</a> has the <code>bundleDependencies</code> option enabled by default.\nIf you opt-out of bundling depen
|
||
|
}
|