mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
35 lines
1020 B
TypeScript
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;
|
|
}
|
|
}
|