Domanda

I use the following in Hot Towel SPA template

router.mapNav('details');
router.mapNav('home')

If I simply want to override the name property of the route (to appear in navigation bar) how would I provide this?

I found this example

router.mapNav({
url: /#\/user\/maintain(#.+)?/,
moduleId: "viewmodels/user/maintain",
name: "Maintain Details",
hash: "#/user/maintain"

});

Do I need to provide all other params to modify the name property?

Cheers

È stato utile?

Soluzione

I believe you can call the method as follows specifying just what you want to override:

router.mapNav({url:'details', name:'Details'});
router.mapNav({url:'home', name:'Awesome Home'});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top