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
This commit is contained in:
Pete Bacon Darwin 2018-01-25 12:12:44 +00:00 committed by Miško Hevery
parent d6d8fe829a
commit f8fa20d71a
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
/* #docregion import */ /* #docregion import */
@import 'hero-details-box.css'; /* The AOT compiler needs the `./` to show that this is local */
@import './hero-details-box.css';
/* #enddocregion import */ /* #enddocregion import */
/* #docregion host */ /* #docregion host */

View File

@ -5,7 +5,8 @@ import { Hero } from './hero';
@Component({ @Component({
selector: 'app-hero-team', selector: 'app-hero-team',
template: ` template: `
<link rel="stylesheet" href="assets/hero-team.component.css"> <!-- 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> <h3>Team</h3>
<ul> <ul>
<li *ngFor="let member of hero.team"> <li *ngFor="let member of hero.team">