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

Commit bfd51a2

Browse files
committed
more post-review changes
1 parent b22d186 commit bfd51a2

File tree

5 files changed

+12
-22
lines changed

5 files changed

+12
-22
lines changed

public/docs/_examples/toh-5/dart/lib/hero_detail_component.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// #docplaster
22
// #docregion , v2
3+
// #docregion added-imports
34
import 'dart:async';
4-
// #docregion dart-html
5-
import 'dart:html';
6-
// #enddocregion dart-html
5+
import 'dart:html' show window;
76

7+
// #enddocregion added-imports
88
import 'package:angular2/core.dart';
99
// #docregion added-imports
1010
import 'package:angular2/router.dart';

public/docs/_examples/toh-5/ts/app/hero-detail.component.1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Component, Input, OnInit } from '@angular/core';
88
import { ActivatedRoute, Params } from '@angular/router';
99

1010
import { HeroService } from './hero.service';
11-
// #docregion added-imports
11+
// #enddocregion added-imports
1212

1313
// Bogus code below this point. It is only here to make lint happy.
1414
import { Hero } from './hero';

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,6 @@ block extract-id
118118
:marked
119119
Notice how we extract the `id` by calling the `RouteParams.get` method.
120120

121-
block dart-html
122-
:marked
123-
We'll also need to import `dart:html` to gain access to `window`.
124-
125-
+makeExcerpt('lib/hero_detail_component.dart', 'dart-html', '')
126-
127121
block heroes-component-cleanup
128122
:marked
129123
Because the template for `HeroesComponent` no longer uses `HeroDetailComponent`

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,14 @@ block router-config-intro
206206
+makeExcerpt('app/' + _file + ' (heroes route)', 'heroes')
207207

208208
- var _are = _docsFor == 'dart' ? 'takes' : 'are'
209+
- var _routePathPrefix = _docsFor == 'dart' ? '/' : ''
209210
:marked
210211
The `!{_RoutesVsAtRouteConfig}` !{_are} !{_an} !{_array} of *route definitions*.
211212
We have only one route definition at the moment but rest assured, we'll add more.
212213

213214
This *route definition* has the following parts:
214215

215-
- **path**: the router matches this route's path to the URL in the browser address bar (`/heroes`).
216+
- **path**: the router matches this route's path to the URL in the browser address bar (`!{_routePathPrefix}heroes`).
216217
<li if-docs="dart"> **name**: the official name of the route;
217218
it *must* begin with a capital letter to avoid confusion with the *path* (`Heroes`).</li>
218219
- **component**: the component that the router should create when navigating to this route (`HeroesComponent`).
@@ -359,7 +360,7 @@ block redirect-vs-use-as-default
359360
They don't do anything yet but they'll be convenient when we style the links a little later in the chapter.
360361

361362
:marked
362-
Refresh the browser. The app displays the dashboard and
363+
Refresh the browser from the application root. The app displays the dashboard and
363364
we can navigate between the dashboard and the heroes.
364365

365366
## Dashboard Top Heroes
@@ -577,9 +578,6 @@ block extract-id
577578

578579
+makeExcerpt('app/hero-detail.component.ts', 'goBack')
579580

580-
block dart-html
581-
//- N/A
582-
583581
- var _CanDeactivateGuard = _docsFor == 'dart' ? '<em>routerCanDeactivate</em> hook' : '<em>CanDeactivate</em> guard'
584582
- var _CanDeactivateGuardUri = _docsFor == 'dart' ? 'angular2.router/CanDeactivate-class' : 'router/index/CanDeactivate-interface'
585583
.l-sub-section
@@ -599,7 +597,7 @@ block dart-html
599597
incremental improvement and migrate the template to its own file,
600598
called <span ngio-ex>hero-detail.component.html</span>:
601599

602-
+makeExcerpt('app/hero-detail.component.html')
600+
+makeExample('app/hero-detail.component.html')
603601

604602
:marked
605603
We update the component metadata with a `templateUrl` pointing to the template file that we just created.

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,14 @@ block router-config-intro
206206
+makeExcerpt('app/' + _file + ' (heroes route)', 'heroes')
207207

208208
- var _are = _docsFor == 'dart' ? 'takes' : 'are'
209+
- var _routePathPrefix = _docsFor == 'dart' ? '/' : ''
209210
:marked
210211
The `!{_RoutesVsAtRouteConfig}` !{_are} !{_an} !{_array} of *route definitions*.
211212
We have only one route definition at the moment but rest assured, we'll add more.
212213

213214
This *route definition* has the following parts:
214215

215-
- **path**: the router matches this route's path to the URL in the browser address bar (`/heroes`).
216+
- **path**: the router matches this route's path to the URL in the browser address bar (`!{_routePathPrefix}heroes`).
216217
<li if-docs="dart"> **name**: the official name of the route;
217218
it *must* begin with a capital letter to avoid confusion with the *path* (`Heroes`).</li>
218219
- **component**: the component that the router should create when navigating to this route (`HeroesComponent`).
@@ -359,7 +360,7 @@ block redirect-vs-use-as-default
359360
They don't do anything yet but they'll be convenient when we style the links a little later in the chapter.
360361

361362
:marked
362-
Refresh the browser. The app displays the dashboard and
363+
Refresh the browser from the application root. The app displays the dashboard and
363364
we can navigate between the dashboard and the heroes.
364365

365366
## Dashboard Top Heroes
@@ -577,9 +578,6 @@ block extract-id
577578

578579
+makeExcerpt('app/hero-detail.component.ts', 'goBack')
579580

580-
block dart-html
581-
//- N/A
582-
583581
- var _CanDeactivateGuard = _docsFor == 'dart' ? '<em>routerCanDeactivate</em> hook' : '<em>CanDeactivate</em> guard'
584582
- var _CanDeactivateGuardUri = _docsFor == 'dart' ? 'angular2.router/CanDeactivate-class' : 'router/index/CanDeactivate-interface'
585583
.l-sub-section
@@ -599,7 +597,7 @@ block dart-html
599597
incremental improvement and migrate the template to its own file,
600598
called <span ngio-ex>hero-detail.component.html</span>:
601599

602-
+makeExcerpt('app/hero-detail.component.html')
600+
+makeExample('app/hero-detail.component.html')
603601

604602
:marked
605603
We update the component metadata with a `templateUrl` pointing to the template file that we just created.

0 commit comments

Comments
 (0)