Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit d8d6655

Browse files
committed
minor edits to dividing routes prose
1 parent a0413e9 commit d8d6655

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

public/docs/ts/latest/guide/upgrade.jade

+5-10
Original file line numberDiff line numberDiff line change
@@ -815,28 +815,23 @@ figure
815815
:marked
816816
Next we declare both Angular 1 and Angular 2 routes as normal:
817817

818-
+makeExample('upgrade-module/ts/app/divide-routes/app.module.ts', 'ng1-route', 'app.module.ts (angular 1 route)')
819-
+makeExample('upgrade-module/ts/app/divide-routes/hero.module.ts', 'ng2-route', 'hero.module.ts (angular 2 route)')
818+
+makeExample('upgrade-module/ts/app/divide-routes/app.module.ts', 'ng1-route', 'app.module.ts (Angular 1 route)')
819+
+makeExample('upgrade-module/ts/app/divide-routes/hero.module.ts', 'ng2-route', 'hero.module.ts (Angular 2 route)')
820820

821821
:marked
822-
On our `app.module.ts` we need to add `AppComponent` to the declarations and boostrap array.
822+
In our `app.module.ts` we need to add `AppComponent` to the declarations and boostrap array.
823823

824-
Now for the crucial bit: configuring the router itself.
824+
Next we configure the router itself.
825825
We want to use [hash navigation](./router.html#-hashlocationstrategy-) in Angular 2
826826
because that's what we're also using in Angular 1.
827-
We also want to defer the intial navigation until we bootstrap Angular 1, which we do
828-
asynchronously after bootstrapping Angular 2.
829827

830828
Lastly, and most importantly, we want to use a custom `UrlHandlingStrategy` that will tell
831829
the Angular 2 router which routes it should render - and only those.
832830

833831
+makeExample('upgrade-module/ts/app/divide-routes/app.module.ts', 'router-config', 'app.module.ts (router config)')
834832

835833
:marked
836-
The only thing left is to manually kickstart the router after both Angular 1 and Angular 2
837-
are bootstrapped:
838-
839-
+makeExample('upgrade-module/ts/app/divide-routes/main.ts', 'manually-navigate', 'main.ts (bootstrap)')
834+
That's it! Now we're running both routers at the same time.
840835

841836

842837
.l-main-section

0 commit comments

Comments
 (0)