From fd40d2cbd8651a3bdb50e921882dcccd09da4728 Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Thu, 12 Oct 2017 17:39:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BA=A0=E6=AD=A3=E7=BB=86=E5=BE=AE?= =?UTF-8?q?=E7=9A=84=E7=BF=BB=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/upgrade.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aio/content/guide/upgrade.md b/aio/content/guide/upgrade.md index d14046bc52..df5851a95e 100644 --- a/aio/content/guide/upgrade.md +++ b/aio/content/guide/upgrade.md @@ -646,15 +646,19 @@ Read more about [NgModules](guide/ngmodule). ### Bootstrapping hybrid applications -### 引导AngularJS+2的混合式应用程序 +### 引导混合式应用程序 To bootstrap a hybrid application, you must bootstrap each of the Angular and AngularJS parts of the application. You must bootstrap the Angular bits first and then ask the `UpgradeModule` to bootstrap the AngularJS bits next. +要想引导混合式应用,我们在应用中必须同时引导 Angular 和 AngularJS。要先引导 Angular ,然后再调用 `UpgradeModule` 来引导 AngularJS。 + In an AngularJS application you have a root AngularJS module, which will also be used to bootstrap the AngularJS application. +在 AngularJS 应用中有一个 AngularJS 的根模块,我们用它来引导 AngularJS 应用。 + @@ -664,6 +668,8 @@ 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` 模块进行手动引导。在此之前, + Say you have an `ng-app` driven bootstrap such as this one: