angular-cn/aio/dist/generated/docs/guide/upgrade-performance.json

5 lines
30 KiB
JSON
Raw Normal View History

{
"id": "guide/upgrade-performance",
"title": "Upgrading for performance",
"contents": "\n\n\n<div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/aio/content/guide/upgrade-performance.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=\"upgrading-for-performance\">Upgrading for performance<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/upgrade-performance#upgrading-for-performance\"><i class=\"material-icons\">link</i></a></h1>\n<div class=\"alert is-helpful\">\n<p> <em>Angular</em> is the name for the Angular of today and tomorrow.<br>\n<em>AngularJS</em> is the name for all 1.x versions of Angular.</p>\n</div>\n<p>This guide describes some of the built-in tools for efficiently migrating AngularJS projects over to\nthe Angular platform, one piece at a time. It is very similar to\n<a href=\"guide/upgrade\">Upgrading from AngularJS</a> with the exception that this one uses the <a href=\"api/upgrade/static/downgradeModule\">downgradeModule()</a> helper function instead of the <a href=\"api/upgrade/static/UpgradeModule\">UpgradeModule</a> class. This affects how the app is bootstrapped and how change detection is\npropagated between the two frameworks. It allows you to upgrade incrementally while improving the\nspeed of your hybrid apps and leveraging the latest of Angular in AngularJS apps early in the\nprocess of upgrading.</p>\n<h2 id=\"preparation\">Preparation<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/upgrade-performance#preparation\"><i class=\"material-icons\">link</i></a></h2>\n<p>Before discussing how you can use <code><a href=\"api/upgrade/static/downgradeModule\" class=\"code-anchor\">downgradeModule</a>()</code> to create hybrid apps, there are things that\nyou can do to ease the upgrade process even before you begin upgrading. Because the steps are the\nsame regardless of how you upgrade, refer to the <a href=\"guide/upgrade#preparation\">Preparation</a> section of\n<a href=\"guide/upgrade\">Upgrading from AngularJS</a>.</p>\n<h2 id=\"upgrading-with-ngupgrade\">Upgrading with <code>ngUpgrade</code><a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/upgrade-performance#upgrading-with-ngupgrade\"><i class=\"material-icons\">link</i></a></h2>\n<p>With the <code>ngUpgrade</code> library in Angular you can upgrade an existing AngularJS app incrementally by\nbuilding a hybrid app where you can run both frameworks side-by-side. In these hybrid apps you can\nmix and match AngularJS and Angular components and services and have them interoperate seamlessly.\nThat means you don't have to do the upgrade work all at once as there is a natural coexistence\nbetween the two frameworks during the transition period.</p>\n<h3 id=\"how-ngupgrade-works\">How <code>ngUpgrade</code> Works<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"guide/upgrade-performance#how-ngupgrade-works\"><i class=\"material-icons\">link</i></a></h3>\n<p>Regardless of whether you choose <code><a href=\"api/upgrade/static/downgradeModule\" class=\"code-anchor\">downgradeModule</a>()</code> or <code><a href=\"api/upgrade/static/UpgradeModule\" class=\"code-anchor\">UpgradeModule</a></code>, the basic principles of\nupgrading, the mental model behind hybrid apps, and how you use the <a href=\"api/upgrade/static\">upgrade/static</a> utilities remain the same. For more information, see the\n<a href=\"guide/upgrade#how-ngupgrade-works\">How <code>ngUpgrade</code> Works</a> section of\n<a href=\"guide/upgrade\">Upgrading from AngularJS</a>.</p>\n<div class=\"alert is-helpful\">\n<p> The <a href=\"guide/upgrade#change-detection\">Change Detection</a> section of\n<a href=\"guide/upgrade\">Upgrading from AngularJS</a> only applies to apps that use <code><a href=\"api/upgrade/static/UpgradeModule\" class=\"code-anchor\">UpgradeModule</a></code>. Though\nyou handle
}