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

Commit e07e2f8

Browse files
committed
docs(component-styles): new guide chapter - ward's tweaks
1 parent 28a99a8 commit e07e2f8

File tree

11 files changed

+43
-39
lines changed

11 files changed

+43
-39
lines changed

public/docs/_examples/component-styles/ts/app/hero-app-main.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ import {QuestSummaryComponent} from './quest-summary.component';
1515
directives: [HeroDetailsComponent, HeroControlsComponent, QuestSummaryComponent]
1616
})
1717
export class HeroAppMainComponent {
18-
@Input() hero:Hero;
18+
@Input() hero: Hero;
1919
}

public/docs/_examples/component-styles/ts/app/hero-app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import {HeroAppMainComponent} from './hero-app-main.component';
1414
`],
1515
directives: [HeroAppMainComponent]
1616
})
17-
export class HeroAppComponent {
1817
// #enddocregion
18+
export class HeroAppComponent {
1919
hero = new Hero(
2020
'Human Torch',
2121
['Mister Fantastic', 'Invisible Woman', 'Thing']

public/docs/_examples/component-styles/ts/app/hero-controls.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import {Hero} from './hero';
1515
<button (click)="activate()">Activate</button>
1616
`
1717
})
18-
export class HeroControlsComponent {
1918
// #enddocregion inlinestyles
19+
export class HeroControlsComponent {
2020

21-
@Input() hero:Hero;
21+
@Input() hero: Hero;
2222

2323
activate() {
2424
this.hero.active = true;

public/docs/_examples/component-styles/ts/app/hero-team.component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ import {Hero} from './hero';
1111
<li *ngFor="#member of hero.team">
1212
{{member}}
1313
</li>
14-
</ul>
15-
`
14+
</ul>`
1615
})
17-
export class HeroTeamComponent {
1816
// #enddocregion stylelink
19-
20-
@Input() hero:Hero;
17+
export class HeroTeamComponent {
18+
@Input() hero: Hero;
2119
}

public/docs/_examples/component-styles/ts/app/quest-summary.component.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {Component, ViewEncapsulation} from 'angular2/core';
55
// Let TypeScript know about the special SystemJS __moduleName variable
66
declare var __moduleName: string;
77
// #enddocregion
8-
// moduleName doesn't work on Plunkr, set it explicitly
8+
// moduleName is not set in many module loaders; set it explicitly
99
if (!__moduleName) {
1010
__moduleName = `http://${location.host}/${location.pathname}/app/`;
1111
}
@@ -16,8 +16,13 @@ if (!__moduleName) {
1616
selector: 'quest-summary',
1717
template: 'No quests ongoing',
1818
styleUrls: ['quest-summary.component.css'],
19-
})
20-
export class QuestSummaryComponent {
19+
encapsulation: ViewEncapsulation.Emulated // default
20+
/*
21+
// #docregion encapsulation.native
22+
encapsulation: ViewEncapsulation.Native // warning: little browser support at this time
23+
// #enddocregion encapsulation.native
24+
*/
2125

22-
}
26+
})
27+
export class QuestSummaryComponent { }
2328
// #enddocregion

public/docs/_examples/component-styles/ts/app/quest-summary.native.component.css

Lines changed: 0 additions & 12 deletions
This file was deleted.

public/docs/dart/latest/guide/_data.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
"intro": "Attribute directives attach behavior to elements."
6363
},
6464

65+
"component-styles": {
66+
"title": "Component Styles",
67+
"intro": "Learn how to apply CSS styles to components."
68+
},
69+
6570
"hierarchical-dependency-injection": {
6671
"title": "Hierarchical Dependency Injectors",
6772
"navTitle": "Hierarchical Injectors",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")

public/docs/js/latest/guide/_data.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
"intro": "Attribute directives attach behavior to elements."
6363
},
6464

65+
"component-styles": {
66+
"title": "Component Styles",
67+
"intro": "Learn how to apply CSS styles to components."
68+
},
69+
6570
"hierarchical-dependency-injection": {
6671
"title": "Hierarchical Dependency Injectors",
6772
"navTitle": "Hierarchical Injectors",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!= partial("../../../_includes/_ts-temp")

0 commit comments

Comments
 (0)