docs(toh-5) reworded templateUrl/styleUrls notes

This commit is contained in:
Ward Bell 2016-03-08 15:09:31 -08:00
parent af1eaae873
commit beb8efc71f
1 changed files with 2 additions and 2 deletions

View File

@ -286,7 +286,7 @@ code-example(format="." language="bash").
+makeExample('toh-5/ts/app/dashboard.component.ts', 'template-url', 'app/dashboard.component.ts (templateUrl)')(format=".") +makeExample('toh-5/ts/app/dashboard.component.ts', 'template-url', 'app/dashboard.component.ts (templateUrl)')(format=".")
.l-sub-section .l-sub-section
:marked :marked
Even if the template sits on the same folder as the component, the path for the template will be root-relative. We specify the path _all the way back to the application root_. Angular doesn't support module-relative paths.
:marked :marked
Create that file with these contents: Create that file with these contents:
+makeExample('toh-5/ts/app/dashboard.component.html', null, 'dashboard.component.html')(format=".") +makeExample('toh-5/ts/app/dashboard.component.html', null, 'dashboard.component.html')(format=".")
@ -586,7 +586,7 @@ figure.image-display
:marked :marked
The `styleUrls` property is an array of style file names (with paths). The `styleUrls` property is an array of style file names (with paths).
We could list multiple style files from different locations if we needed them. We could list multiple style files from different locations if we needed them.
Like with `templateUrl`, the paths are root-relative. As with `templateUrl`, we must specify the path _all the way back to the application root_.
:marked :marked
### Stylish Hero Details ### Stylish Hero Details
The designers also gave us CSS styles specifically for the `HeroDetailComponent`. The designers also gave us CSS styles specifically for the `HeroDetailComponent`.