Skip to content

Commit 421828a

Browse files
devversionhansl
authored andcommitted
fix(demo-app): resolve mapping paths in relative. (#566)
* Currently, the demo app is mapping its core and components absolutely (`/`), which is working perfectly for the served application * This commit changes the absolute mapping paths to relative paths. This allows developers, to serve the demo-app also in sub-directories. Also this is required for some bundlers, for example SystemJS Builder is not able to build a bundle of the demo app, with absolute paths, because the baseURL may be different. References #553
1 parent bab7f01 commit 421828a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/demo-app/system-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const components = [
2525

2626
/** Map relative paths to URLs. */
2727
const map: any = {
28-
'@angular2-material/core': '/core',
28+
'@angular2-material/core': 'core',
2929
};
30-
components.forEach(name => map[`@angular2-material/${name}`] = `/components/${name}`);
30+
components.forEach(name => map[`@angular2-material/${name}`] = `components/${name}`);
3131

3232

3333
/** User packages configuration. */

src/e2e-app/system-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const components = [
2525

2626
/** Map relative paths to URLs. */
2727
const map: any = {
28-
'@angular2-material/core': '/core',
28+
'@angular2-material/core': 'core',
2929
};
30-
components.forEach(name => map[`@angular2-material/${name}`] = `/components/${name}`);
30+
components.forEach(name => map[`@angular2-material/${name}`] = `components/${name}`);
3131

3232

3333
/** User packages configuration. */

0 commit comments

Comments
 (0)