i trying to create child routes in durandal 2 starterkit as shown in http://durandaljs.com/documentation/Using-The-Router/ without success.
i want to habe something like http://mywebsite.com/#blog/post1/
so in my app i have in viewmodel a shell file viewmodel/shell.js
{ route: 'blog*details', title:'Blog', moduleId: 'blog/index', nav: 2, hash: '#blog' },
and
in app/blog/
i have
index.js
index.js
default/index.js
default/index.html
why is it not working what am i doing wrong ?
thx
EDIT:
this is how my shell.js looks like
define(['plugins/router', 'durandal/app'], function (router, app) {
return {
router: router,
attached : attached,
search: function() {
//It's really easy to show a message box.
//You can add custom options too. Also, it returns a promise for the user's response.
app.showMessage('Search not yet implemented...');
},
activate: function () {
router.map([
{ route: '', title:'Home', moduleId: 'viewmodels/home', nav: 1 },
{ route: 'blog*route', title:'Blog', moduleId: 'blog/index', nav: 2, hash: '#blog' }
]).buildNavigationModel();
return router.activate();
},
footerLinks : [
...
]
};
function attached() {
}//=======attached end
});