Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

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

Closed
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
8 changes: 6 additions & 2 deletions public/docs/ts/latest/guide/component-styles.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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')
Expand Down