Pete Bacon Darwin f8fa20d71a docs(aio): fix paths to imported CSS stylesheets (#21772)
The AOT compiler needs relative paths so that it can find
the imported stylesheets.

PR Close #21772
2018-01-25 13:38:12 -08:00

21 lines
521 B
TypeScript

import { Component, Input } from '@angular/core';
import { Hero } from './hero';
// #docregion stylelink
@Component({
selector: 'app-hero-team',
template: `
<!-- We must use a relative URL so that the AOT compiler can find the stylesheet -->
<link rel="stylesheet" href="../assets/hero-team.component.css">
<h3>Team</h3>
<ul>
<li *ngFor="let member of hero.team">
{{member}}
</li>
</ul>`
})
// #enddocregion stylelink
export class HeroTeamComponent {
@Input() hero: Hero;
}