Skip to content

Commit

Permalink
fix(demo-app): resolve mapping paths in relative. (#566)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
devversion authored and hansl committed May 30, 2016
1 parent bab7f01 commit 421828a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/demo-app/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const components = [

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


/** User packages configuration. */
Expand Down
4 changes: 2 additions & 2 deletions src/e2e-app/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const components = [

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


/** User packages configuration. */
Expand Down

0 comments on commit 421828a

Please sign in to comment.