Skip to content

Commit

Permalink
docs: Component Styles guide for CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
wardbell committed Oct 18, 2017
1 parent 81173b0 commit 67f7edd
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 135 deletions.
3 changes: 2 additions & 1 deletion aio/content/examples/component-styles/plnkr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"files": [
"!**/*.d.ts",
"!**/*.js",
"!**/*.native.*"
"!**/*.native.*",
"!**/*.[1].*"
],
"tags": ["CSS"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1 {
font-weight: normal;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Component, HostBinding } from '@angular/core';
import { Hero } from './hero';

// #docregion
@Component({
selector: 'app-root',
template: `
<h1>Tour of Heroes</h1>
<app-hero-main [hero]="hero"></app-hero-main>
`,
styleUrls: ['./hero-app.component.css']
})
export class HeroAppComponent {
// #enddocregion
hero = new Hero(
'Human Torch',
['Mister Fantastic', 'Invisible Woman', 'Thing']
);

@HostBinding('class') get themeClass() {
return 'theme-light';
}
// #docregion
}
// #enddocregion
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { Hero } from './hero';
selector: 'app-root',
template: `
<h1>Tour of Heroes</h1>
<app-hero-main [hero]=hero></app-hero-main>`,
<app-hero-main [hero]="hero"></app-hero-main>
`,
styles: ['h1 { font-weight: normal; }']
})
export class HeroAppComponent {
Expand Down

0 comments on commit 67f7edd

Please sign in to comment.