From 421828a87c9a59a87193a868979936d8c54ee610 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 30 May 2016 23:25:30 +0200 Subject: [PATCH] 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 --- src/demo-app/system-config.ts | 4 ++-- src/e2e-app/system-config.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/demo-app/system-config.ts b/src/demo-app/system-config.ts index 70a392b66f6d..53bd96fe04c6 100644 --- a/src/demo-app/system-config.ts +++ b/src/demo-app/system-config.ts @@ -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. */ diff --git a/src/e2e-app/system-config.ts b/src/e2e-app/system-config.ts index 70a392b66f6d..53bd96fe04c6 100644 --- a/src/e2e-app/system-config.ts +++ b/src/e2e-app/system-config.ts @@ -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. */