update phonecat-final prose
This commit is contained in:
parent
8f23969bc5
commit
0985055d2f
|
@ -1347,7 +1347,7 @@ code-example(format="").
|
|||
The Angular 1 directive had a `checkmark` _filter_.
|
||||
Let's turn that into an Angular 2 **pipe**.
|
||||
|
||||
There is no upgrade adapter method to convert filters into pipes.
|
||||
There is no upgrade method to convert filters into pipes.
|
||||
You won't miss it.
|
||||
It's easy to turn the filter function into an equivalent Pipe class.
|
||||
The implementation is the same as before, repackaged in the `transform` method.
|
||||
|
@ -1449,7 +1449,11 @@ code-example(format="").
|
|||
Now switch the bootstrap method of the application from the `UpgradeAdapter`
|
||||
to the Angular 2 way.
|
||||
|
||||
Now we can drop `upgrade.bootstrap` from our application bootstrap, and remove the
|
||||
`ngDoBootstrap()` override from `app.module.ts`
|
||||
|
||||
+makeExample('upgrade-phonecat-3-final/ts/app/main.ts', null, 'main.ts')
|
||||
+makeExample('upgrade-phonecat-3-final/ts/app/app.module.ts', null, 'app.module.ts')
|
||||
|
||||
:marked
|
||||
You are now running a pure Angular 2 application!
|
||||
|
@ -1460,18 +1464,16 @@ code-example(format="").
|
|||
its new life as a pure, shiny Angular 2 app. The remaining tasks all have to
|
||||
do with removing code - which of course is every programmer's favorite task!
|
||||
|
||||
If you haven't already, remove all references to the `UpgradeAdapter` from `main.ts`.
|
||||
Also remove the Angular 1 bootstrap code.
|
||||
|
||||
When you're done, this is what `main.ts` should look like:
|
||||
|
||||
+makeExample('upgrade-phonecat-3-final/ts/app/main.ts', null, 'app/main.ts')
|
||||
If you haven't already, remove all references to the `UpgradeModule` from `app.module.ts`,
|
||||
as well as any [Factory provider](#making-angular-1-dependencies-injectable-to-angular-2) for Angular 1 services.
|
||||
Also remove any `downgradeComponent()` you find, together with the associated Angular 1
|
||||
directive declarations.
|
||||
|
||||
:marked
|
||||
You may also completely remove the following files. They are Angular 1
|
||||
module configuration files and not needed in Angular 2:
|
||||
|
||||
* `app/app.module.ts`
|
||||
* `app/app.module.ng1.ts`
|
||||
* `app/app.config.ts`
|
||||
* `app/core/core.module.ts`
|
||||
* `app/core/phone/phone.module.ts`
|
||||
|
@ -1482,7 +1484,7 @@ code-example(format="").
|
|||
we still need are for Jasmine and Angular 2 polyfills.
|
||||
|
||||
code-example(format="").
|
||||
npm uninstall @types/angular --save-dev
|
||||
npm uninstall @types/angular @types/angular-animate @types/angular-cookies @types/angular-mocks @types/angular-resource @types/angular-route @types/angular-sanitize --save-dev
|
||||
|
||||
:marked
|
||||
Finally, from `index.html`, remove all references to
|
||||
|
@ -1580,7 +1582,7 @@ table
|
|||
|
||||
|
||||
:marked
|
||||
When the bootstrap method is switched from that of `UpgradeAdapter` to
|
||||
When the bootstrap method is switched from that of `UpgradeModule` to
|
||||
pure Angular 2, Angular 1 ceases to exist on the page completely.
|
||||
At this point we need to tell Protractor that it should not be looking for
|
||||
an Angular 1 app anymore, but instead it should find *Angular 2 apps* from
|
||||
|
|
Loading…
Reference in New Issue