chore: miscelanea fixes for new aio (#3491)

This commit is contained in:
Jesús Rodríguez 2017-04-02 00:12:45 +02:00 committed by GitHub
parent 6fa6a1d328
commit 58e5fbe007
4 changed files with 12 additions and 13 deletions

View File

@ -26,7 +26,7 @@ a#toc
* [View and Child Decorators](#view-child-decorators)<br> * [View and Child Decorators](#view-child-decorators)<br>
* [AOT compilation in _TypeScript_ Only](#aot)<br> * [AOT compilation in _TypeScript_ Only](#aot)<br>
**Run and compare the live <live-example name="cb-ts-to-js">_TypeScript_</live-example> and <live-example name="cb-ts-to-js" lang="js">JavaScript</live-example> **Run and compare the live <live-example name="cb-ts-to-js">TypeScript</live-example> and <live-example name="cb-ts-to-js" lang="js">JavaScript</live-example>
code shown in this cookbook.** code shown in this cookbook.**
a#from-ts a#from-ts

View File

@ -58,7 +58,7 @@ block includes
* <live-example plnkr="minimal.0">A minimal NgModule app</live-example> * <live-example plnkr="minimal.0">A minimal NgModule app</live-example>
* <live-example plnkr="contact.1b">The first contact module</live-example> * <live-example plnkr="contact.1b">The first contact module</live-example>
* <live-example plnkr="contact.2">The revised contact module</live-example> * <live-example plnkr="contact.2">The revised contact module</live-example>
* <live-example plnkr="pre-shared.3">Just before adding _SharedModule_</live-example> * <live-example plnkr="pre-shared.3">Just before adding SharedModule</live-example>
* <live-example>The final version</live-example> * <live-example>The final version</live-example>
### Frequently asked questions (FAQs) ### Frequently asked questions (FAQs)
@ -823,11 +823,10 @@ a#shared-module
and share them with the modules that need them. and share them with the modules that need them.
1. Create an `src/app/shared` folder. 1. Create an `src/app/shared` folder.
1. Move the `AwesomePipe` and `HighlightDirective` from `src/app/contact` to `src/app/shared`.
* Move the `AwesomePipe` and `HighlightDirective` from `src/app/contact` to `src/app/shared`. 1. Delete the `HighlightDirective` classes from `src/app/` and `src/app/hero`.
* Delete the `HighlightDirective` classes from `src/app/` and `src/app/hero`. 1. Create a `SharedModule` class to own the shared material.
* Create a `SharedModule` class to own the shared material. 1. Update other feature modules to import `SharedModule`.
* Update other feature modules to import `SharedModule`.
Here is the `SharedModule`: Here is the `SharedModule`:
+makeExample('ngmodule/ts/src/app/shared/shared.module.ts', '', 'src/app/src/app/shared/shared.module.ts') +makeExample('ngmodule/ts/src/app/shared/shared.module.ts', '', 'src/app/src/app/shared/shared.module.ts')

View File

@ -290,7 +290,7 @@ a#configure-routes
+makeExample('toh-5/ts/src/app/app.module.ts', 'dashboard', 'src/app/app.module.ts (dashboard)') +makeExample('toh-5/ts/src/app/app.module.ts', 'dashboard', 'src/app/app.module.ts (dashboard)')
:marked :marked
### Add a !{_redirect} route ### Add a redirect route
Currently, the browser launches with `/` in the address bar. Currently, the browser launches with `/` in the address bar.
When the app starts, it should show the dashboard and When the app starts, it should show the dashboard and

View File

@ -24,12 +24,12 @@ block includes
## Keep the app transpiling and running ## Keep the app transpiling and running
Enter the following command in the terminal window: Enter the following command in the terminal window:
code-example(language="sh" class="code-shell"). code-example(language="sh" class="code-shell").
npm start npm start
:marked :marked
This command runs the TypeScript compiler in "watch mode", recompiling automatically when the code changes. This command runs the TypeScript compiler in "watch mode", recompiling automatically when the code changes.
The command simultaneously launches the app in a browser and refreshes the browser when the code changes. The command simultaneously launches the app in a browser and refreshes the browser when the code changes.
:marked :marked
You can keep building the Tour of Heroes without pausing to recompile or refresh the browser. You can keep building the Tour of Heroes without pausing to recompile or refresh the browser.