docs(aio): cleanup aalert, callout, subsection use and author style (#24986)

PR Close #24986
This commit is contained in:
Stefanie Fluin
2018-07-19 15:00:08 -07:00
committed by Victor Berchet
parent d6016f1d1d
commit d523630ea2
55 changed files with 345 additions and 306 deletions

View File

@ -19,7 +19,7 @@ Create a new project named `angular-tour-of-heroes` with this CLI command.
The Angular CLI generated a new project with a default application and supporting files.
<div class="l-sub-section">
<div class="alert is-helpful">
@ -41,7 +41,7 @@ Go to the project directory and launch the application.
ng serve --open
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
The `ng serve` command builds the app, starts the development server,
watches the source files, and rebuilds the app as you make changes to those files.

View File

@ -87,7 +87,7 @@ If you look at the `@Injectable()` statement right before the `HeroService` clas
When you provide the service at the root level, Angular creates a single, shared instance of `HeroService` and injects into any class that asks for it.
Registering the provider in the `@Injectable` metadata also allows Angular to optimize an app by removing the service if it turns out not to be used after all.
<div class="l-sub-section">
<div class="alert is-helpful">
If you need to, you can register providers at different levels:
in the `HeroesComponent`, in the `AppComponent`, in the `AppModule`.
@ -213,7 +213,7 @@ Replace the `getHeroes` method with this one.
`of(HEROES)` returns an `Observable<Hero[]>` that emits _a single value_, the array of mock heroes.
<div class="l-sub-section">
<div class="alert is-helpful">
In the [HTTP tutorial](tutorial/toh-pt6), you'll call `HttpClient.get<Hero[]>()` which also returns an `Observable<Hero[]>` that emits _a single value_, an array of heroes from the body of the HTTP response.
@ -320,7 +320,7 @@ when it creates the `HeroService`.
path="toh-pt4/src/app/hero.service.ts" region="ctor">
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
This is a typical "*service-in-service*" scenario:
you inject the `MessageService` into the `HeroService` which is injected into the `HeroesComponent`.

View File

@ -28,7 +28,7 @@ Use the CLI to generate it.
ng generate module app-routing --flat --module=app
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
`--flat` puts the file in `src/app` instead of its own folder.<br>
`--module=app` tells the CLI to register it in the `imports` array of the `AppModule`.
@ -91,7 +91,7 @@ configure it with the `routes` in one step by calling
region="ngmodule-imports">
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
The method is called `forRoot()` because you configure the router at the application's root level.
The `forRoot()` method supplies the service providers and directives needed for routing,
@ -112,7 +112,7 @@ You removed `<app-heroes>` because you will only display the `HeroesComponent` w
The `<router-outlet>` tells the router where to display routed views.
<div class="l-sub-section">
<div class="alert is-helpful">
The `RouterOutlet` is one of the router directives that became available to the `AppComponent`
because `AppModule` imports `AppRoutingModule` which exported `RouterModule`.
@ -165,7 +165,7 @@ but not the heroes list.
Click the link.
The address bar updates to `/heroes` and the list of heroes appears.
<div class="l-sub-section">
<div class="alert is-helpful">
Make this and future navigation links look better by adding private CSS styles to `app.component.css`
as listed in the [final code review](#appcomponent) below.

View File

@ -158,7 +158,7 @@ Applying the optional type specifier, `<Hero[]>` , gives you a typed result obje
The shape of the JSON data is determined by the server's data API.
The _Tour of Heroes_ data API returns the hero data as an array.
<div class="l-sub-section">
<div class="alert is-helpful">
Other APIs may bury the data that you want within an object.
You might have to dig that data out by processing the `Observable` result
@ -536,7 +536,7 @@ before passing along the latest string. You'll never make requests more frequent
It cancels and discards previous search observables, returning only the latest search service observable.
<div class="l-sub-section">
<div class="alert is-helpful">
With the [switchMap operator](http://www.learnrxjs.io/operators/transformation/switchmap.html),
every qualifying key event can trigger an `HttpClient.get()` method call.