Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aio/content/examples/component-styles/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Component Style Tests', function () {
let externalH1 = element(by.css('body > h1'));

// Note: sometimes webdriver returns the fontWeight as "normal",
// othertimes as "400", both of which are equal in CSS terms.
// other times as "400", both of which are equal in CSS terms.
expect(componentH1.getCssValue('fontWeight')).toMatch(/normal|400/);
expect(externalH1.getCssValue('fontWeight')).not.toMatch(/normal|400/);
});
Expand Down
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].*"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOC, isn't [1] the same as 1?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe, but we are using that syntax everywhere because sometimes we have more values than 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
Loading