Created
October 27, 2018 06:26
-
-
Save azaharafernandezguizan/87afb63d77cb1f65eee0bec0543c20c8 to your computer and use it in GitHub Desktop.
Aurelia Routing example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {RouterConfiguration, Router} from 'aurelia-router'; | |
import {PLATFORM} from 'aurelia-pal'; | |
export class App { | |
router: Router; | |
configureRouter(config: RouterConfiguration, router: Router): void { | |
this.router = router; | |
config.title = 'Aurelia'; | |
config.map([ | |
{ route: ['', 'home'], name: 'home', moduleId: PLATFORM.moduleName('./home'), nav: true, title: 'Bienvenida' }, | |
{ route: 'analisis', name: 'analisis', moduleId:PLATFORM.moduleName('./analisis'), nav: true, title: 'Entiende tu análisis' }, | |
{ route: 'game', name: 'game', moduleId:PLATFORM.moduleName('./game'), nav: true, title: 'Juego MicrobiologiaTest' }, | |
{ route: 'fun', name: 'fun', moduleId:PLATFORM.moduleName('./fun'), nav: true, title: 'Ciencia Divertida' } | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment