From 8c7b991e4f6595c7b942844ff0fd5311685e4876 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Wed, 6 Apr 2016 11:46:21 -0700 Subject: [PATCH] docs(component-styles): mark `__moduleName` experimental; use alert instead of callout. closes #1054 --- public/docs/ts/latest/guide/component-styles.jade | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/docs/ts/latest/guide/component-styles.jade b/public/docs/ts/latest/guide/component-styles.jade index fc6569c954..af41817a0e 100644 --- a/public/docs/ts/latest/guide/component-styles.jade +++ b/public/docs/ts/latest/guide/component-styles.jade @@ -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')