From c880a96ad1b94230c0383d8fb222881a62bb3776 Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Thu, 12 Oct 2017 17:43:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E8=A1=A5=E9=81=97=E6=BC=8F?= =?UTF-8?q?=E7=9A=84=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/upgrade.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/upgrade.md b/aio/content/guide/upgrade.md index df5851a95e..0664ae7228 100644 --- a/aio/content/guide/upgrade.md +++ b/aio/content/guide/upgrade.md @@ -668,10 +668,12 @@ directive somewhere on the HTML page. But for hybrid applications, you manually manual JavaScript [`angular.bootstrap`](https://docs.angularjs.org/api/ng/function/angular.bootstrap) method even before switching them to hybrid mode. -单纯的 AngularJS 应用可以在 HTML 页面中使用 `ng-app` 指令进行引导,但对于混合式应用我们要通过 `UpgradeModule` 模块进行手动引导。在此之前, +单纯的 AngularJS 应用可以在 HTML 页面中使用 `ng-app` 指令进行引导,但对于混合式应用我们要通过 `UpgradeModule` 模块进行手动引导。因此,在切换成混合式应用之前,最好先把 AngularJS 改写成使用 [`angular.bootstrap`](https://docs.angularjs.org/api/ng/function/angular.bootstrap) 进行手动引导的方式。 Say you have an `ng-app` driven bootstrap such as this one: +比如我们现在有这样一个通过 `ng-app` 进行引导的应用: + @@ -679,7 +681,6 @@ You can remove the `ng-app` and `ng-strict-di` directives from the HTML and instead switch to calling `angular.bootstrap` from JavaScript, which will result in the same thing: - 我们可以从HTML中移除`ng-app`和`ng-strict-di`指令,改为从JavaScript中调用`angular.bootstrap`,它能达到同样效果: