/aurelia_app_routing_conf.ts Secret
Created
May 17, 2017 07:11
Aurelia App routing configuration
This file contains hidden or 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 {Router, PipelineStep, NavigationContext} from 'aurelia-router'; | |
export class App { | |
router: Router; | |
configureRouter(config, router: Router) { | |
config.title = 'Vikara'; | |
config.addPipelineStep("authorize", AuthPipelineStep); | |
config.map([ | |
{ route: ['', 'home'], name: 'home', moduleId: './home/home', nav: true, title: 'Home Page' }, | |
{ route: 'login', name: 'login', moduleId: './login/login', nav: true, title: 'Login' } | |
]); | |
this.router = router; | |
} | |
} | |
class AuthPipelineStep implements PipelineStep { | |
public run(context: NavigationContext, next: Function): void { | |
// here missing: return next.cancel(); or return next(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment