Question

I use the following in Hot Towel SPA template for ASP.net MVC

 router.mapNav('home');
 router.mapNav('register');
 router.mapNav('login');

I wanted to clear the existing routes and push my new values.

 router.mapNav('Career');
 router.mapNav('Contact');

How do I achieve this in my project?

I am trying to achieve a functionality to set new nav bars after some authentication check.

Was it helpful?

Solution

OTHER TIPS

Adding some more information based on the discussion happened in the link https://groups.google.com/forum/m/#!topic/durandaljs/jXMFG1I6PVw ,I have added deactivate function in router.js. Find the detailed answer below.

deactivate: function () {
    router.allRoutes.removeAll();
    router.visibleRoutes.removeAll();
    if (sammy) {
        sammy.destroy();
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top