@@ -456,6 +456,12 @@ figure.image-display
456
456
457
457
+ makeExample('upgrade-module/ts/app/1-2-hybrid-bootstrap/app.module.ts' , 'bootstrap' )
458
458
459
+ :marked
460
+ We also need to install the `@angular/upgrade` package via `npm install @angular/upgrade --save`
461
+ and add a mapping for the `@angular/upgrade/static` package:
462
+
463
+ + makeExample('upgrade-module/ts/systemjs.config.1.js' , 'upgrade-static-umd' , 'systemjs.config.js (map)' )
464
+
459
465
:marked
460
466
Congratulations! You're running a hybrid Angular 1+2 application! The
461
467
existing Angular 1 code works as before _and_ you're ready to run Angular 2 code.
@@ -1124,8 +1130,12 @@ code-example(format="").
1124
1130
:marked
1125
1131
We also need to make a couple of adjustments
1126
1132
to the `systemjs.config.js` file installed during [setup](setup.html).
1127
- We want to point the browser to the project
1128
- root when loading things through SystemJS, instead of using the `<base>` URL:
1133
+
1134
+ We want to point the browser to the project root when loading things through SystemJS,
1135
+ instead of using the `<base>` URL.
1136
+
1137
+ We also need to install the `upgrade` package via `npm install @angular/upgrade --save`
1138
+ and add a mapping for the `@angular/upgrade/static` package.
1129
1139
1130
1140
+ makeExample('upgrade-phonecat-2-hybrid/ts/systemjs.config.1.js' , 'paths' , 'systemjs.config.js' )
1131
1141
@@ -1603,11 +1613,15 @@ code-example(format="").
1603
1613
* `app/core/phone/phone.module.ts`
1604
1614
* `app/phone-detail/phone-detail.module.ts`
1605
1615
* `app/phone-list/phone-list.module.ts`
1606
-
1616
+
1607
1617
The external typings for Angular 1 may be uninstalled as well. The only ones
1608
1618
we still need are for Jasmine and Angular 2 polyfills.
1609
1619
1620
+ The `@angular/upgrade` package and it's mapping in `systemjs.config.js` can also go,
1621
+ we don't need them anymore.
1622
+
1610
1623
code-example( format ="" ) .
1624
+ npm uninstall @angular/upgrade --save
1611
1625
npm uninstall @types/angular @types/angular-animate @types/angular-cookies @types/angular-mocks @types/angular-resource @types/angular-route @types/angular-sanitize --save-dev
1612
1626
1613
1627
:marked
0 commit comments