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

Commit e503efe

Browse files
Foxandxsswardbell
authored andcommitted
docs(toh5): add moduleId information (#2597)
1 parent 94b8793 commit e503efe

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

public/docs/_examples/toh-5/ts/app/dashboard.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ import { Router } from '@angular/router';
77

88
import { Hero } from './hero';
99
import { HeroService } from './hero.service';
10-
10+
// #docregion metadata
1111
@Component({
1212
moduleId: module.id,
1313
selector: 'my-dashboard',
14-
// #docregion templateUrl
1514
templateUrl: 'dashboard.component.html',
16-
// #enddocregion templateUrl
15+
// #enddocregion metadata
1716
// #docregion css
1817
styleUrls: [ 'dashboard.component.css' ]
1918
// #enddocregion css
19+
// #docregion metadata
2020
})
21+
// #enddocregion metadata
2122
// #docregion component
2223
export class DashboardComponent implements OnInit {
2324

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import { Location } from '@angular/common';
66

77
import { Hero } from './hero';
88
import { HeroService } from './hero.service';
9-
9+
// #docregion metadata
1010
@Component({
1111
moduleId: module.id,
1212
selector: 'my-hero-detail',
13-
// #docregion templateUrl
1413
templateUrl: 'hero-detail.component.html',
15-
// #enddocregion templateUrl, v2
14+
// #enddocregion metadata, v2
1615
styleUrls: [ 'hero-detail.component.css' ]
17-
// #docregion v2
16+
// #docregion metadata, v2
1817
})
18+
// #enddocregion metadata
1919
// #docregion implement
2020
export class HeroDetailComponent implements OnInit {
2121
// #enddocregion implement

public/docs/_examples/toh-5/ts/app/heroes.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import { HeroService } from './hero.service';
88

99
// #docregion renaming, metadata
1010
@Component({
11+
// #enddocregion renaming
1112
moduleId: module.id,
13+
// #docregion renaming
1214
selector: 'my-heroes',
1315
// #enddocregion renaming
1416
templateUrl: 'heroes.component.html',

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ block redirect-vs-use-as-default
367367

368368
Set the `moduleId` property to `module.id` for module-relative loading of the `templateUrl`.
369369

370-
+makeExcerpt('app/dashboard.component.ts', 'templateUrl')
370+
+makeExcerpt('app/dashboard.component.ts', 'metadata')
371371

372372
:marked
373373
Create that file with this content:
@@ -585,9 +585,9 @@ block extract-id
585585
+makeExample('app/hero-detail.component.html')
586586

587587
:marked
588-
We update the component metadata with a `templateUrl` pointing to the template file that we just created.
588+
We update the component metadata with a `moduleId` and a `templateUrl` pointing to the template file that we just created.
589589

590-
+makeExcerpt('app/hero-detail.component.ts', 'templateUrl')
590+
+makeExcerpt('app/hero-detail.component.ts', 'metadata')
591591

592592
:marked
593593
Refresh the browser and see the results.
@@ -759,7 +759,7 @@ figure.image-display
759759
1. *Cut-and-paste* the template contents into a new <span ngio-ex>heroes.component.html</span> file.
760760
1. *Cut-and-paste* the styles contents into a new <span ngio-ex>heroes.component.css</span> file.
761761
1. *Set* the component metadata's `templateUrl` and `styleUrls` properties to refer to both files.
762-
1. *Set* the `moduleId` property to `module.id` so that 'templateUrl` and `styleUrls` are relative to the component.
762+
1. *Set* the `moduleId` property to `module.id` so that `templateUrl` and `styleUrls` are relative to the component.
763763

764764
.l-sub-section
765765
:marked

0 commit comments

Comments
 (0)