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

Commit 1503691

Browse files
authored
docs: followup amends for 4.0 release (#3431)
1 parent 4cf2a09 commit 1503691

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
lines changed

public/docs/_examples/animations/ts/src/app/app.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
// #docregion animations-module
12
import { NgModule } from '@angular/core';
23
import { BrowserModule } from '@angular/platform-browser';
34
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5+
// #enddocregion animations-module
46

57
import { HeroTeamBuilderComponent } from './hero-team-builder.component';
68
import { HeroListBasicComponent } from './hero-list-basic.component';
@@ -14,8 +16,10 @@ import { HeroListGroupsComponent } from './hero-list-groups.component';
1416
import { HeroListMultistepComponent } from './hero-list-multistep.component';
1517
import { HeroListTimingsComponent } from './hero-list-timings.component';
1618

19+
// #docregion animation-module
1720
@NgModule({
1821
imports: [ BrowserModule, BrowserAnimationsModule ],
22+
// #enddocregion animation-module
1923
declarations: [
2024
HeroTeamBuilderComponent,
2125
HeroListBasicComponent,

public/docs/_examples/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"zone.js": "^0.8.4"
3333
},
3434
"devDependencies": {
35-
"@angular/cli": "^1.0.0-rc.4",
35+
"@angular/cli": "^1.0.0",
3636
"@types/angular": "^1.5.16",
3737
"@types/angular-animate": "^1.5.5",
3838
"@types/angular-cookies": "^1.4.2",

public/docs/_examples/router/ts/src/app/app.module.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
import { NgModule } from '@angular/core';
44
import { BrowserModule } from '@angular/platform-browser';
55
import { FormsModule } from '@angular/forms';
6+
// #docregion animations-module
7+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
8+
9+
// #enddocregion animations-module
610
// #docregion inspect-config
711
import { Router } from '@angular/router';
8-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
912

1013
// #enddocregion inspect-config
1114
import { AppComponent } from './app.component';
@@ -19,14 +22,18 @@ import { PageNotFoundComponent } from './not-found.component';
1922

2023
import { DialogService } from './dialog.service';
2124

25+
// #docregion animations-module
2226
@NgModule({
2327
imports: [
28+
// #enddocregion animations-module
2429
BrowserModule,
2530
FormsModule,
2631
HeroesModule,
2732
LoginRoutingModule,
2833
AppRoutingModule,
34+
// #docregion animations-module
2935
BrowserAnimationsModule
36+
// #enddocregion animations-module
3037
],
3138
declarations: [
3239
AppComponent,

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ figure
4949
driven by a model attribute.
5050

5151
Animations are defined inside `@Component` metadata. Before you can add animations, you need
52-
to import a few animation-specific functions:
52+
to import a few animation-specific imports and functions:
5353

54+
+makeExample('animations/ts/src/app/app.module.ts', 'animations-module', 'app.module.ts (@NgModule imports excerpt)')(format=".")
5455
+makeExample('animations/ts/src/app/hero-list-basic.component.ts', 'imports', 'hero-list-basic.component.ts')(format=".")
5556

5657
:marked
@@ -353,7 +354,7 @@ figure
353354
+makeExample('animations/ts/src/app/hero-list-multistep.component.ts', 'template', 'hero-list-multistep.component.ts (excerpt)')(format=".")
354355

355356
:marked
356-
The callbacks receive an `AnimationTransitionEvent` which contains useful properties such as `fromState`,
357-
`toState` and `totalTime`.
357+
The callbacks receive an `AnimationEvent` that contains contains useful properties such as
358+
`fromState`, `toState` and `totalTime`.
358359

359360
Those callbacks will fire whether or not an animation is picked up.

public/docs/ts/latest/guide/dependency-injection.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ block dart-map-alternative
890890
An `Injector` is itself an injectable service.
891891

892892
In this example, Angular injects the component's own `Injector` into the component's constructor.
893-
The component then asks the injected injector for the services it wants.
893+
The component then asks the injected injector for the services it wants in `ngOnInit()`.
894894

895895
Note that the services themselves are not injected into the component.
896896
They are retrieved by calling `injector.get()`.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,10 @@ a#route-animation
14301430
This section shows you how to add some [animations](../guide/animations.html)
14311431
to the `HeroDetailComponent`.
14321432

1433+
First import `BrowserAnimationsModule`:
1434+
+makeExcerpt('src/app/app.module.ts', 'animations-module', 'src/app/app.module.ts (@NgModule imports excerpt)')
1435+
1436+
:marked
14331437
Create an `animations.ts` file in the root `src/app/` folder. The contents look like this:
14341438
+makeExcerpt('src/app/animations.ts', '', 'src/app/animations.ts')
14351439
:marked

0 commit comments

Comments
 (0)