Files
JavaScriptServices/templates/AureliaSpa/ClientApp/app/components/app/app.ts
2017-04-13 20:54:56 +01:00

35 lines
1020 B
TypeScript

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