Update Aurelia SPA template

This commit is contained in:
Meirion Hughes
2017-04-09 08:53:22 +01:00
parent ea429cccf4
commit 37df30929c
7 changed files with 126 additions and 137 deletions

View File

@@ -1,4 +1,4 @@
import { Aurelia } from 'aurelia-framework';
import { Aurelia, PLATFORM } from 'aurelia-framework';
import { Router, RouterConfiguration } from 'aurelia-router';
export class App {
@@ -10,21 +10,21 @@ export class App {
route: [ '', 'home' ],
name: 'home',
settings: { icon: 'home' },
moduleId: '../home/home',
moduleId: PLATFORM.moduleName('../home/home'),
nav: true,
title: 'Home'
}, {
route: 'counter',
name: 'counter',
settings: { icon: 'education' },
moduleId: '../counter/counter',
moduleId: PLATFORM.moduleName('../counter/counter'),
nav: true,
title: 'Counter'
}, {
route: 'fetch-data',
name: 'fetchdata',
settings: { icon: 'th-list' },
moduleId: '../fetchdata/fetchdata',
moduleId: PLATFORM.moduleName('../fetchdata/fetchdata'),
nav: true,
title: 'Fetch data'
}]);

View File

@@ -1,5 +1,5 @@
import 'isomorphic-fetch';
import { Aurelia } from 'aurelia-framework';
import { Aurelia, PLATFORM } from 'aurelia-framework';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap';
declare const IS_DEV_BUILD: boolean; // The value is supplied by Webpack during the build
@@ -11,5 +11,5 @@ export function configure(aurelia: Aurelia) {
aurelia.use.developmentLogging();
}
aurelia.start().then(() => aurelia.setRoot('app/components/app/app'));
aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app/components/app/app')));
}