Conditional routing in Durandal
问题 In my HotTowel based project, I'm using Durandal 1.1.1 for routing. I have a login route, which I want to activate if the user is not logged in. my route config is like: var routes = [ { url: 'login', moduleId: 'viewmodels/login', name: 'Login', visible: true, caption: 'Login' },{ url: 'moduledetail/:id', moduleId: 'viewmodels/moduledetail', name: 'ModuleDetail', visible: true, caption: 'ModuleDetail' } I want if user want to go #/moduledetail/1 and is not authenticated yet, the browser