forked from nishanperera/HTMLStarterKitPro
/
shell.js
19 lines (18 loc) · 812 Bytes
/
shell.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
define(['plugins/router', 'durandal/app', 'mymodule1', 'mymodule2'], function (router, app, mymodule1, mymodule2) {
console.log('modules test:', mymodule1.test, mymodule2.test);
return {
router: router,
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:'Welcome', moduleId: 'viewmodels/welcome', nav: true },
{ route: 'flickr', moduleId: 'viewmodels/flickr', nav: true }
]).buildNavigationModel();
return router.activate();
}
};
});