diff --git a/public/docs/_examples/toh-6/ts/src/app/dashboard.component.ts b/public/docs/_examples/toh-6/ts/src/app/dashboard.component.ts
index 1eb93f9c01..9960aa77d4 100644
--- a/public/docs/_examples/toh-6/ts/src/app/dashboard.component.ts
+++ b/public/docs/_examples/toh-6/ts/src/app/dashboard.component.ts
@@ -5,7 +5,6 @@ import { Hero } from './hero';
import { HeroService } from './hero.service';
@Component({
- moduleId: module.id,
selector: 'my-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: [ './dashboard.component.css' ]
diff --git a/public/docs/_examples/toh-6/ts/src/app/hero-detail.component.ts b/public/docs/_examples/toh-6/ts/src/app/hero-detail.component.ts
index 3f1c7b72f9..b3bbbd2f3d 100644
--- a/public/docs/_examples/toh-6/ts/src/app/hero-detail.component.ts
+++ b/public/docs/_examples/toh-6/ts/src/app/hero-detail.component.ts
@@ -8,7 +8,6 @@ import { Hero } from './hero';
import { HeroService } from './hero.service';
@Component({
- moduleId: module.id,
selector: 'my-hero-detail',
templateUrl: './hero-detail.component.html',
styleUrls: [ './hero-detail.component.css' ]
diff --git a/public/docs/_examples/toh-6/ts/src/app/hero-search.component.ts b/public/docs/_examples/toh-6/ts/src/app/hero-search.component.ts
index 949ef897db..8b2d32f06b 100644
--- a/public/docs/_examples/toh-6/ts/src/app/hero-search.component.ts
+++ b/public/docs/_examples/toh-6/ts/src/app/hero-search.component.ts
@@ -20,7 +20,6 @@ import { HeroSearchService } from './hero-search.service';
import { Hero } from './hero';
@Component({
- moduleId: module.id,
selector: 'hero-search',
templateUrl: './hero-search.component.html',
styleUrls: [ './hero-search.component.css' ],
diff --git a/public/docs/_examples/toh-6/ts/src/app/heroes.component.ts b/public/docs/_examples/toh-6/ts/src/app/heroes.component.ts
index 2a92adfaa8..6350b803c4 100644
--- a/public/docs/_examples/toh-6/ts/src/app/heroes.component.ts
+++ b/public/docs/_examples/toh-6/ts/src/app/heroes.component.ts
@@ -6,7 +6,6 @@ import { Hero } from './hero';
import { HeroService } from './hero.service';
@Component({
- moduleId: module.id,
selector: 'my-heroes',
templateUrl: './heroes.component.html',
styleUrls: [ './heroes.component.css' ]
diff --git a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ts b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ts
index e486ab3e6d..aa20ebb801 100644
--- a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ts
+++ b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ts
@@ -12,7 +12,6 @@ import { RouteParams } from '../ajs-upgraded-providers';
// #docregion initialclass
@Component({
- moduleId: module.id,
selector: 'phone-detail',
templateUrl: './phone-detail.template.html',
// #enddocregion initialclass
diff --git a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-list/phone-list.component.ts b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-list/phone-list.component.ts
index bdd5930b79..1f51c6faa2 100644
--- a/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-list/phone-list.component.ts
+++ b/public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-list/phone-list.component.ts
@@ -10,7 +10,6 @@ import { Phone, PhoneData } from '../core/phone/phone.service';
// #docregion downgrade-component
@Component({
- moduleId: module.id,
selector: 'phone-list',
templateUrl: 'phone-list.template.html'
})
diff --git a/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-detail/phone-detail.component.ts b/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-detail/phone-detail.component.ts
index 048a4104c8..32a3d40790 100644
--- a/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-detail/phone-detail.component.ts
+++ b/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-detail/phone-detail.component.ts
@@ -8,7 +8,6 @@ import { Phone, PhoneData } from '../core/phone/phone.service';
import { RouteParams } from '../ajs-upgraded-providers';
@Component({
- moduleId: module.id,
templateUrl: 'phone-detail.template.html',
})
export class PhoneDetailComponent {
diff --git a/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-list/phone-list.component.ts b/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-list/phone-list.component.ts
index d198774deb..40f522bec8 100644
--- a/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-list/phone-list.component.ts
+++ b/public/docs/_examples/upgrade-phonecat-3-router/ts/app/phone-list/phone-list.component.ts
@@ -6,7 +6,6 @@ import { Component } from '@angular/core';
import { Phone, PhoneData } from '../core/phone/phone.service';
@Component({
- moduleId: module.id,
templateUrl: 'phone-list.template.html'
})
export class PhoneListComponent {
diff --git a/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-detail/phone-detail.component.ts b/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-detail/phone-detail.component.ts
index 579dd5601e..dd47f746f6 100644
--- a/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-detail/phone-detail.component.ts
+++ b/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-detail/phone-detail.component.ts
@@ -6,7 +6,6 @@ import { ActivatedRoute } from '@angular/router';
import { Phone, PhoneData } from '../core/phone/phone.service';
@Component({
- moduleId: module.id,
selector: 'phone-detail',
templateUrl: './phone-detail.template.html'
})
diff --git a/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-list/phone-list.component.ts b/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-list/phone-list.component.ts
index 0d9eb07e21..6cfd172027 100644
--- a/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-list/phone-list.component.ts
+++ b/public/docs/_examples/upgrade-phonecat-4-final/ts/app/phone-list/phone-list.component.ts
@@ -4,7 +4,6 @@ import { Component } from '@angular/core';
import { Phone, PhoneData } from '../core/phone/phone.service';
@Component({
- moduleId: module.id,
selector: 'phone-list',
templateUrl: './phone-list.template.html',
})
diff --git a/public/docs/_examples/upgrade-phonecat-4-final/ts/systemjs.config.1.js b/public/docs/_examples/upgrade-phonecat-4-final/ts/systemjs.config.1.js
index afb510f0a1..c48bb7ca39 100644
--- a/public/docs/_examples/upgrade-phonecat-4-final/ts/systemjs.config.1.js
+++ b/public/docs/_examples/upgrade-phonecat-4-final/ts/systemjs.config.1.js
@@ -10,6 +10,7 @@
'npm:': '/node_modules/'
},
map: {
+ 'ng-loader': '../src/systemjs-angular-loader.js',
app: '/app',
// #enddocregion paths
// angular bundles
@@ -35,7 +36,12 @@
packages: {
'app': {
main: './main.js',
- defaultExtension: 'js'
+ defaultExtension: 'js',
+ meta: {
+ './*.js': {
+ loader: 'ng-loader'
+ }
+ }
},
rxjs: {
defaultExtension: 'js'
diff --git a/public/docs/_examples/user-input/ts/src/app/app.component.ts b/public/docs/_examples/user-input/ts/src/app/app.component.ts
index 56906ef048..5f885d5105 100644
--- a/public/docs/_examples/user-input/ts/src/app/app.component.ts
+++ b/public/docs/_examples/user-input/ts/src/app/app.component.ts
@@ -2,7 +2,6 @@
import { Component } from '@angular/core';
@Component({
- moduleId: module.id,
selector: 'my-app',
templateUrl: './app.component.html'
})
diff --git a/public/docs/js/latest/cookbook/_data.json b/public/docs/js/latest/cookbook/_data.json
index 166fc94f39..b8bcbf545c 100644
--- a/public/docs/js/latest/cookbook/_data.json
+++ b/public/docs/js/latest/cookbook/_data.json
@@ -22,11 +22,6 @@
"intro": "Share information between different directives and components"
},
- "component-relative-paths": {
- "title": "Component-relative Paths",
- "intro": "Use relative URLs for component templates and styles."
- },
-
"dependency-injection": {
"title": "Dependency Injection",
"intro": "Techniques for Dependency Injection"
diff --git a/public/docs/ts/latest/cookbook/_data.json b/public/docs/ts/latest/cookbook/_data.json
index 63382b3243..c1425ea05f 100644
--- a/public/docs/ts/latest/cookbook/_data.json
+++ b/public/docs/ts/latest/cookbook/_data.json
@@ -21,11 +21,6 @@
"intro": "Share information between different directives and components"
},
- "component-relative-paths": {
- "title": "Component-relative Paths",
- "intro": "Use relative URLs for component templates and styles."
- },
-
"dependency-injection": {
"title": "Dependency Injection",
"intro": "Techniques for Dependency Injection"
diff --git a/public/docs/ts/latest/cookbook/aot-compiler.jade b/public/docs/ts/latest/cookbook/aot-compiler.jade
index fe8401f538..50c4ba8786 100644
--- a/public/docs/ts/latest/cookbook/aot-compiler.jade
+++ b/public/docs/ts/latest/cookbook/aot-compiler.jade
@@ -140,14 +140,6 @@ code-example(language="none" class="code-shell").
While JIT app URLs are more flexible, stick with _component-relative_ URLs for compatibility with AOT compilation.
- JIT-compiled applications that use the SystemJS loader and _component-relative_ URLs *must set the* `@Component.moduleId` *property to* `module.id`.
- The `module` object is undefined when an AOT-compiled app runs.
- The app fails with a null reference error unless you assign a global `module` value in the `index.html` like this:
-+makeExample('cb-aot-compiler/ts/src/index.html','moduleId')(format='.')
-.l-sub-section
- :marked
- Setting a global `module` is a temporary expedient.
-
:marked
### Compiling the application
diff --git a/public/docs/ts/latest/cookbook/component-relative-paths.jade b/public/docs/ts/latest/cookbook/component-relative-paths.jade
deleted file mode 100644
index df9845c853..0000000000
--- a/public/docs/ts/latest/cookbook/component-relative-paths.jade
+++ /dev/null
@@ -1,147 +0,0 @@
-include ../_util-fns
-
-:marked
- ## Write *Component-Relative* URLs to component templates and style files
-
- Our components often refer to external template and style files.
- We identify those files with a URL in the `templateUrl` and `styleUrls` properties of the `@Component` metadata
- as seen here:
-
-+makeExample('cb-component-relative-paths/ts/src/app/some.component.ts','absolute-config')(format='.')
-:marked
- By default, we *must* specify the full path back to the application root.
- We call this an ***absolute path*** because it is *absolute* with respect to the application root.
-
- There are two problems with an *absolute path*:
-
- 1. We have to remember the full path back to the application root.
-
- 1. We have to update the URL when we move the component around in the application files structure.
-
- It would be much easier to write and maintain our application components if we could specify template and style locations
- *relative* to their component class file.
-
- *We can!*
-
-.alert.is-important
- :marked
- We can if we build our application as `commonjs` modules and load those modules
- with a suitable package loader such as `systemjs` or `webpack`.
- Learn why [below](#why-default).
-
- The Angular CLI uses these technologies and defaults to the
- *component-relative path* approach described here.
- CLI users can skip this chapter or read on to understand
- how it works.
-
-.l-main-section
-:marked
- ## _Component-Relative_ Paths
-
- Our goal is to specify template and style URLs *relative* to their component class files,
- hence the term ***component-relative path***.
-
- The key to success is following a convention that puts related component files in well-known locations.
-
- We recommend keeping component template and component-specific style files as *siblings* of their
- companion component class files.
- Here we see the three files for `SomeComponent` sitting next to each other in the `app` folder.
-
-.filetree
- .file app
- .children
- .file some.component.css
- .file some.component.html
- .file some.component.ts
- .file ...
-:marked
- We'll have more files and folders — and greater folder depth — as our application grows.
- We'll be fine as long as the component files travel together as the inseparable siblings they are.
-
- ### Set the *moduleId*
-
- Having adopted this file structure convention, we can specify locations of the template and style files
- relative to the component class file simply by setting the `moduleId` property of the `@Component` metadata like this
-+makeExample('cb-component-relative-paths/ts/src/app/some.component.ts','module-id')(format='.')
-:marked
- We strip the `src/app/` base path from the `templateUrl` and `styleUrls` and replace it with `./`.
- The result looks like this:
-+makeExample('cb-component-relative-paths/ts/src/app/some.component.ts','relative-config')(format='.')
-
-.alert.is-helpful
- :marked
- Webpack users may prefer [an alternative approach](#webpack).
-
-.l-main-section
-:marked
- ## Source
-
- **We can see the **
- and download the source code from there
- or simply read the pertinent source here.
-+makeTabs(
- `cb-component-relative-paths/ts/src/app/some.component.ts,
- cb-component-relative-paths/ts/src/app/some.component.html,
- cb-component-relative-paths/ts/src/app/some.component.css,
- cb-component-relative-paths/ts/src/app/app.component.ts`,
- null,
- `src/app/some.component.ts, src/app/some.component.html, src/app/some.component.css, src/app/app.component.ts`)
-
-a#why-default
-.l-main-section
-:marked
- ## Appendix: why *component-relative* is not the default
-
- A *component-relative* path is obviously superior to an *absolute* path.
- Why did Angular default to the *absolute* path?
- Why do *we* have to set the `moduleId`? Why can't Angular set it?
-
- First, let's look at what happens if we use a relative path and omit the `moduleId`.
-
- `EXCEPTION: Failed to load some.component.html`
-
- Angular can't find the file so it throws an error.
-
- Why can't Angular calculate the template and style URLs from the component file's location?
-
- Because the location of the component can't be determined without the developer's help.
- Angular apps can be loaded in many ways: from individual files, from SystemJS packages, or
- from CommonJS packages, to name a few.
- We might generate modules in any of several formats.
- We might not be writing modular code at all!
-
- With this diversity of packaging and module load strategies,
- it's not possible for Angular to know with certainty where these files reside at runtime.
-
- The only location Angular can be sure of is the URL of the `index.html` home page, the application root.
- So by default it resolves template and style paths relative to the URL of `index.html`.
- That's why we previously wrote our file URLs with an `app/` base path prefix.
-
- But *if* we follow the recommended guidelines and we write modules in `commonjs` format
- and we use a module loader that *plays nice*,
- *then* we — the developers of the application —
- know that the semi-global `module.id` variable is available and contains
- the absolute URL of the component class module file.
-
- That knowledge enables us to tell Angular where the *component* file is
- by setting the `moduleId`:
-+makeExample('cb-component-relative-paths/ts/src/app/some.component.ts','module-id')(format='.')
-
-a#webpack
-.l-main-section
-:marked
- ## Webpack: load templates and styles
- Webpack developers have an alternative to `moduleId`.
-
- They can load templates and styles at runtime by adding `./` at the beginning of the `template` and `styles` / `styleUrls`
- properties that reference *component-relative URLS.
-
-+makeExample('webpack/ts/src/app/app.component.ts')(format='.')
-
-.l-sub-section
- :marked
- Webpack will do a `require` behind the scenes to load the templates and styles. Read more [here](../guide/webpack.html#highlights).
-
-
-:marked
- See the [Introduction to Webpack](../guide/webpack.html).
diff --git a/public/docs/ts/latest/cookbook/ts-to-js.jade b/public/docs/ts/latest/cookbook/ts-to-js.jade
index bd89b29375..55c99cfe74 100644
--- a/public/docs/ts/latest/cookbook/ts-to-js.jade
+++ b/public/docs/ts/latest/cookbook/ts-to-js.jade
@@ -250,17 +250,6 @@ a#class-metadata
:marked
Note that both the _TypeScript_ and _ES6_ `templateUrl` properties identify the location of the template file _relative to the component module_.
- All three metadata configurations specify the `moduleId` property
- so that Angular can calculate the proper module address.
-
- The _ES5_ approach shown here does not support modules and therefore there is no way to calculate a _module-relative URL_.
- The `templateUrl` for the _ES5_ code must specify the _path from the project root_ and
- omits the irrelevant `moduleId` property.
-
-.l-sub-section
- :marked
- With the right tooling, the `moduleId` may not be needed in the other JavaScript dialects either.
- But it's safest to provide it anyway.
a#dsl
.l-main-section
diff --git a/public/docs/ts/latest/guide/architecture.jade b/public/docs/ts/latest/guide/architecture.jade
index fd4d1e9965..e6dabb52b2 100644
--- a/public/docs/ts/latest/guide/architecture.jade
+++ b/public/docs/ts/latest/guide/architecture.jade
@@ -252,11 +252,9 @@ block ts-decorator
The `@Component` decorator takes a required configuration object with the
information Angular needs to create and present the component and its view.
- Here are a few of the possible `@Component` configuration options:
+ Here are a few of the most useful @Component configuration options:
:marked
-
`moduleId`: sets the source of the base address (`module.id`) for module-relative URLs such as the `templateUrl`.
-
- `selector`: CSS selector that tells Angular to create and insert an instance of this component
where it finds a `` tag in *parent* HTML.
For example, if an app's HTML contains ``, then
diff --git a/public/docs/ts/latest/guide/change-log.jade b/public/docs/ts/latest/guide/change-log.jade
index 60ca5240cf..c3dd7ca6ab 100644
--- a/public/docs/ts/latest/guide/change-log.jade
+++ b/public/docs/ts/latest/guide/change-log.jade
@@ -5,6 +5,13 @@ block includes
The Angular documentation is a living document with continuous improvements.
This log calls attention to recent significant changes.
+ ## All mention of moduleId removed. "Component relative paths" cookbook deleted (2017-03-13)
+ We added a new SystemJS plugin (systemjs-angular-loader.js) to our recommended SystemJS configuration.
+ This plugin dynamically converts "component-relative" paths in templateUrl and styleUrls to "absolute paths" for you.
+
+ We strongly encourage you to only write component-relative paths.
+ That is the only form of URL discussed in these docs. You no longer need to write @Component({ moduleId: module.id }), nor should you.
+
## NEW: Downloadable examples for each guide (2017-02-28)
Now you can download the sample code for any guide and run it locally.
Look for the new download links next to the "live example" links.
diff --git a/public/docs/ts/latest/guide/component-styles.jade b/public/docs/ts/latest/guide/component-styles.jade
index a113ea5fa9..bf608ae90e 100644
--- a/public/docs/ts/latest/guide/component-styles.jade
+++ b/public/docs/ts/latest/guide/component-styles.jade
@@ -302,10 +302,7 @@ code-example(format="nocode").
block module-id
:marked
- You can change the way Angular calculates the full URL by setting the component metadata's `moduleId` property to `module.id`.
+ You can use a relative URL by prefixing your filenames with `./`:
+makeExample('src/app/quest-summary.component.ts')
- :marked
- Learn more about `moduleId` in the [Component-Relative Paths](../cookbook/component-relative-paths.html) page.
-
diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade
index 804f0d81fb..93102adcc7 100644
--- a/public/docs/ts/latest/guide/forms.jade
+++ b/public/docs/ts/latest/guide/forms.jade
@@ -130,7 +130,6 @@ figure.image-display
- The code imports the Angular core library and the `Hero` model you just created.
- The `@Component` selector value of "hero-form" means you can drop this form in a parent template with a `` tag.
- - The `moduleId: module.id` property sets the base for module-relative loading of the `templateUrl`.
- The `templateUrl` property points to a separate file for the template HTML.
- You defined dummy data for `model` and `powers`, as befits a demo.
Down the road, you can inject a data service to get and save real data
diff --git a/public/docs/ts/latest/guide/reactive-forms.jade b/public/docs/ts/latest/guide/reactive-forms.jade
index 1670a88124..00c2457ad3 100644
--- a/public/docs/ts/latest/guide/reactive-forms.jade
+++ b/public/docs/ts/latest/guide/reactive-forms.jade
@@ -176,10 +176,6 @@ a#create-component
+makeExample('reactive-forms/ts/src/app/hero-detail.component.ts', 'metadata','src/app/hero-detail.component.ts (excerpt)')(format=".")
:marked
- The `moduleId: module.id` lets you use
- [component-relative paths](../cookbook/component-relative-paths.html) in file URLs
- such as when specifying the `templateUrl`.
-
Next, create an exported `HeroDetailComponent` class with a `FormControl`.
`FormControl` is a directive that allows you to create and manage
a `FormControl` instance directly.
diff --git a/public/docs/ts/latest/guide/style-guide.jade b/public/docs/ts/latest/guide/style-guide.jade
index 1cd291b675..74e51ae8bb 100644
--- a/public/docs/ts/latest/guide/style-guide.jade
+++ b/public/docs/ts/latest/guide/style-guide.jade
@@ -1681,7 +1681,7 @@ a(href="#toc") Back to top
.s-rule.do
:marked
- **Do** specify _component-relative_ URLs, prefixed with `./`, and add `moduleId: module.id` to the component metadata.
+ **Do** specify _component-relative_ URLs, prefixed with `./`.
.s-why
:marked
@@ -1697,11 +1697,6 @@ a(href="#toc") Back to top
:marked
**Why?** A _component relative_ URL requires no change when you move the component files, as long as the files stay together.
-.s-why
- :marked
- **Why?** The JIT compiler requires the `moduleId` for relative URLs; the AOT compiler,
- which doesn't need it, safely ignores this property.
-
.s-why.s-why-last
:marked
**Why?** The `./` prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix.
diff --git a/public/docs/ts/latest/index.jade b/public/docs/ts/latest/index.jade
index 763b4f3cbc..6930679b4a 100644
--- a/public/docs/ts/latest/index.jade
+++ b/public/docs/ts/latest/index.jade
@@ -45,8 +45,6 @@
a(href="/docs/#{lang}/#{vers}/cookbook/ajs-quick-reference.html") AngularJS to Angular
li
a(href="/docs/#{lang}/#{vers}/cookbook/component-communication.html") Component Interaction
- li
- a(href="/docs/#{lang}/#{vers}/cookbook/component-relative-paths.html") Component-Relative Paths
li
a(href="/docs/#{lang}/#{vers}/cookbook/dependency-injection.html") Dependency Injection
li
diff --git a/public/docs/ts/latest/tutorial/toh-pt5.jade b/public/docs/ts/latest/tutorial/toh-pt5.jade
index b2044cf0c5..ab6aa21da9 100644
--- a/public/docs/ts/latest/tutorial/toh-pt5.jade
+++ b/public/docs/ts/latest/tutorial/toh-pt5.jade
@@ -358,9 +358,6 @@ block redirect-vs-use-as-default
Replace the `template` metadata with a `templateUrl` property that points to a new
template file.
-+ifDocsFor('ts|js')
- :marked
- Set the `moduleId` property to `module.id` for module-relative loading of the `templateUrl`.
+makeExcerpt('src/app/dashboard.component.ts', 'metadata')
@@ -597,7 +594,7 @@ block extract-id
+makeExample('src/app/hero-detail.component.html')
:marked
- We update the component metadata with a `moduleId` and a `templateUrl` pointing to the template file that we just created.
+ We update the component metadata with a `templateUrl` pointing to the template file that we just created.
+makeExcerpt('src/app/hero-detail.component.ts', 'metadata')
@@ -759,7 +756,6 @@ figure.image-display
1. *Cut-and-paste* the template contents into a new heroes.component.html file.
1. *Cut-and-paste* the styles contents into a new heroes.component.css file.
1. *Set* the component metadata's `templateUrl` and `styleUrls` properties to refer to both files.
-
. *Set* the `moduleId` property to `module.id` so that `templateUrl` and `styleUrls` are relative to the component.
.l-sub-section
:marked
@@ -869,9 +865,7 @@ block css-files
block style-urls
:marked
- First add `moduleId: module.id` to the `@Component` metadata of the `AppComponent`
- to enable _module-relative_ file URLs.
- Then add a `styleUrls` property that points to this CSS file as follows.
+ Add a `styleUrls` property that points to this CSS file as follows.
+makeExcerpt('src/app/app.component.ts','styleUrls')
diff --git a/public/resources/live-examples/reactive-forms/ts/final-eplnkr.html b/public/resources/live-examples/reactive-forms/ts/final-eplnkr.html
deleted file mode 100644
index 217473733d..0000000000
--- a/public/resources/live-examples/reactive-forms/ts/final-eplnkr.html
+++ /dev/null
@@ -1,948 +0,0 @@
-
\ No newline at end of file
diff --git a/public/resources/live-examples/reactive-forms/ts/final-plnkr.html b/public/resources/live-examples/reactive-forms/ts/final-plnkr.html
deleted file mode 100644
index a9fe278c0a..0000000000
--- a/public/resources/live-examples/reactive-forms/ts/final-plnkr.html
+++ /dev/null
@@ -1,948 +0,0 @@
-
\ No newline at end of file
diff --git a/tools/plunker-builder/builder.js b/tools/plunker-builder/builder.js
index 9189cc0cf9..25aee5d969 100644
--- a/tools/plunker-builder/builder.js
+++ b/tools/plunker-builder/builder.js
@@ -43,6 +43,7 @@ class PlunkerBuilder {
if (config.basePath.indexOf('/ts') > -1) {
// uses systemjs.config.js so add plunker version
this.options.addField(postData, 'systemjs.config.js', this.systemjsConfig);
+ this.options.addField(postData, 'systemjs-angular-loader.js', this.systemjsModulePlugin);
}
}
@@ -213,11 +214,13 @@ class PlunkerBuilder {
}
_getPlunkerFiles() {
+ var systemJsModulePlugin = '/_boilerplate/src/systemjs-angular-loader.js';
var systemJsConfigPath = '/_boilerplate/src/systemjs.config.web.js';
if (this.options.build) {
systemJsConfigPath = '/_boilerplate/src/systemjs.config.web.build.js';
}
this.systemjsConfig = fs.readFileSync(this.basePath + systemJsConfigPath, 'utf-8');
+ this.systemjsModulePlugin = fs.readFileSync(this.basePath + systemJsModulePlugin, 'utf-8');
// Copyright already added to web versions of systemjs.config
// this.systemjsConfig += this.copyrights.jsCss;