docs(component-styles): mark `__moduleName` experimental; use alert instead of callout.

closes #1054
This commit is contained in:
Ward Bell 2016-04-06 11:46:21 -07:00
parent 9370113b9d
commit 8c7b991e4f
1 changed files with 6 additions and 2 deletions

View File

@ -118,7 +118,7 @@ a(id="special-selectors")
:marked
The `/deep/` selector also has the alias `>>>`. We can use either of the two interchangeably.
.callout.is-important
.alert.is-important
:marked
The `/deep/` and `>>>` selectors should only be used with **emulated** view encapsulation.
This is the default and it is what we use most of the time. See the
@ -160,7 +160,7 @@ a(id='loading-styles')
+makeExample('component-styles/ts/app/hero-details.component.ts', 'styleurls')
.callout.is-important
.alert.is-important
:marked
The URL is ***relative to the application root*** which is usually the
location of the `index.html` web page that hosts the application.
@ -333,6 +333,10 @@ code-example(format='').
Fortunately, *certain* module loaders make it easy.
SystemJS (starting in v.0.19.19) sets a special `__moduleName` variable to the URL of the component file.
.alert.is-important
:marked
Caution: we currently regard the *__moduleName* feature as experimental.
:marked
Now it's trivial to set the `moduleId` to the `__moduleName` and write module-relative paths for style and template URLs.
+makeExample('component-styles/ts/app/quest-summary.component.ts','', 'app/quest-summary.component.ts')