Skip to content

Instantly share code, notes, and snippets.

@ralbu
Created January 21, 2017 15:22
Show Gist options
  • Save ralbu/4f2b9dbec1cadf6b27c32831af2d3613 to your computer and use it in GitHub Desktop.
Save ralbu/4f2b9dbec1cadf6b27c32831af2d3613 to your computer and use it in GitHub Desktop.
Aurelia router config
App.html
<template>
<h1>${message}</h1>
<h2>Routes here</h2>
<router-view></router-view>
</template>
app.js
export class App {
constructor() {
this.message = 'Hello World!';
}
configureRouter(config, router) {
this.router = router;
config.title = 'Aurelia';
config.map([
{ route: 'school', name: 'school', moduleId: 'school', nav: true }
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment