Skip to content

Instantly share code, notes, and snippets.

@azaharafernandezguizan
Created October 27, 2018 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azaharafernandezguizan/87afb63d77cb1f65eee0bec0543c20c8 to your computer and use it in GitHub Desktop.
Save azaharafernandezguizan/87afb63d77cb1f65eee0bec0543c20c8 to your computer and use it in GitHub Desktop.
Aurelia Routing example
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