Debugging Durandal's 2.0's new router
I'm currently upgrading a site from Durandal 1.2 to 2.0, following the
guide they provide. I can't seem to get the router back to working -With
just 2 basic pages, I:
Entering the site with a hash works (site/, or site/#otherpage)
Any use of navigate('otherpage') or <a href="#otherpage"> doesn't go to
the page (both do successfully update the browser's URL hash)
There are no errors on the JS console with system.debug(true) on.
My router config (in shell.js) is simply:
function activate() {
return router.map([
{ route: '', moduleId: 'viewmodels/home', nav: true },
{ route: 'otherpage', moduleId: 'viewmodels/otherpage', nav:
true }
]).buildNavigationModel()
.activate();
What's my next step to check the router, or other items I may have missed
in the upgrade?
Thanks
No comments:
Post a Comment