mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
Update Aurelia SPA template
This commit is contained in:
@@ -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'
|
||||
}]);
|
||||
|
||||
@@ -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')));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user