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

Commit fdfb011

Browse files
committed
post-review changes
1 parent 693f1db commit fdfb011

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

public/_includes/_util-fns.jade

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ script.
222222
- // E.g. of a project relative path is 'app/main.ts'
223223
- if (ex.title === null || ex.title === undefined) {
224224
- // Title is not given so take it to be ex.filePath.
225-
- // Is title like styles.1.css? Then drop the '.1' qualifier:
226-
- var matches = ex.filePath.match(/^(.*)\.\d(\.\w+)$/);
225+
- // Title like styles.1.css or foo_1.dart? Then drop the '.1' or '_1' qualifier:
226+
- var matches = ex.filePath.match(/^(.*)[\._]\d(\.\w+)$/);
227227
- ex.title = matches ? matches[1] + matches[2] : ex.filePath;
228228
- }
229229
- ex.filePath = getExampleName() + '/' + _docsFor + '/' + ex.filePath;
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,41 @@
11
// #docplaster
22
// #docregion , v2
33
import 'package:angular2/core.dart';
4+
// #enddocregion ,
5+
// #docregion v2
6+
import 'package:angular2/router.dart';
7+
// #docregion
48

59
import 'hero_service.dart';
610
import 'heroes_component.dart';
711

812
// #enddocregion v2
913
@Component(
10-
selector: 'my-app',
11-
template: '''
14+
selector: 'my-app',
15+
template: '''
1216
<h1>{{title}}</h1>
1317
<my-heroes></my-heroes>''',
14-
directives: const [HeroesComponent],
15-
providers: const [HeroService])
16-
// #enddocregion
18+
directives: const [HeroesComponent],
19+
providers: const [HeroService])
20+
// #enddocregion ,
21+
class Bogus {}
22+
1723
// #docregion v2
1824
@Component(
19-
selector: 'my-app',
20-
// #docregion template-v2
21-
template: '''
25+
selector: 'my-app',
26+
// #docregion template-v2
27+
template: '''
2228
<h1>{{title}}</h1>
2329
<a [routerLink]="['Heroes']">Heroes</a>
2430
<router-outlet></router-outlet>''',
25-
// #enddocregion template-v2
26-
directives: const [HeroesComponent],
27-
providers: const [HeroService])
28-
// #docregion , v2
31+
// #enddocregion template-v2
32+
directives: const [ROUTER_DIRECTIVES],
33+
providers: const [HeroService, ROUTER_PROVIDERS])
34+
// #docregion v2
35+
@RouteConfig(const [
36+
const Route(path: '/heroes', name: 'Heroes', component: HeroesComponent)
37+
])
38+
// #docregion ,
2939
class AppComponent {
3040
String title = 'Tour of Heroes';
3141
}

public/docs/dart/latest/tutorial/toh-pt5.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ block router-config-intro
7171
The `AppComponent` doesn't have a router yet. We'll use the `@RouteConfig`
7272
annotation to simultaneously:
7373

74-
- Assign a router to the component and
74+
- Assign a router to the component
7575
- Configure that router with *routes*
7676

7777
block routerLink

public/docs/ts/_cache/tutorial/toh-pt5.jade

+5-5
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ block keep-app-running
135135
* Create the file <span ngio-ex>app/app.component.ts</span>.
136136
* Define an <span if-docs="ts">exported</span> `AppComponent` class.
137137
* Add an `@Component` !{_decorator} above the class with a `my-app` selector.
138-
* Move from `HeroesComponent` to `AppComponent` the
139-
* `title` class property, and
140-
* `@Component` template `<h1>` element containing a `title` binding.
138+
* Move the following from `HeroesComponent` to `AppComponent`:
139+
* `title` class property
140+
* `@Component` template `<h1>` element, which contains a binding to `title`
141141
* Add a `<my-heroes>` element to the app template just below the heading so we still see the heroes.
142142
* Add `HeroesComponent` to the `!{_declsVsDirectives}` !{_array} of `!{_AppModuleVsAppComp}` so Angular recognizes the `<my-heroes>` tags.
143143
* Add `HeroService` to the `providers` !{_array} of `!{_AppModuleVsAppComp}` because we'll need it in every other view.
@@ -315,7 +315,7 @@ block routerLink
315315

316316
Go back to `!{_appRoutingTsVsAppComp}` and teach it to navigate to the dashboard.
317317

318-
Import `DashboardComponent` and
318+
Import the dashboard component and
319319
add the following route definition to the `!{_RoutesVsAtRouteConfig}` !{_array} of definitions.
320320

321321
- var _file = _docsFor == 'dart' ? 'lib/app_component.dart' : 'app/app.routing.ts'
@@ -891,7 +891,7 @@ block file-tree-end
891891
.file index.html
892892
.file package.json
893893
.file styles.css
894-
.file systemjs.config.json
894+
.file systemjs.config.js
895895
.file tsconfig.json
896896
.file typings.json
897897

public/docs/ts/latest/tutorial/toh-pt5.jade

+4-4
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ block keep-app-running
135135
* Create the file <span ngio-ex>app/app.component.ts</span>.
136136
* Define an <span if-docs="ts">exported</span> `AppComponent` class.
137137
* Add an `@Component` !{_decorator} above the class with a `my-app` selector.
138-
* Move from `HeroesComponent` to `AppComponent` the
139-
* `title` class property, and
140-
* `@Component` template `<h1>` element containing a `title` binding.
138+
* Move the following from `HeroesComponent` to `AppComponent`:
139+
* `title` class property
140+
* `@Component` template `<h1>` element, which contains a binding to `title`
141141
* Add a `<my-heroes>` element to the app template just below the heading so we still see the heroes.
142142
* Add `HeroesComponent` to the `!{_declsVsDirectives}` !{_array} of `!{_AppModuleVsAppComp}` so Angular recognizes the `<my-heroes>` tags.
143143
* Add `HeroService` to the `providers` !{_array} of `!{_AppModuleVsAppComp}` because we'll need it in every other view.
@@ -315,7 +315,7 @@ block routerLink
315315

316316
Go back to `!{_appRoutingTsVsAppComp}` and teach it to navigate to the dashboard.
317317

318-
Import `DashboardComponent` and
318+
Import the dashboard component and
319319
add the following route definition to the `!{_RoutesVsAtRouteConfig}` !{_array} of definitions.
320320

321321
- var _file = _docsFor == 'dart' ? 'lib/app_component.dart' : 'app/app.routing.ts'

0 commit comments

Comments
 (0)