Skip to content

Instantly share code, notes, and snippets.

@wasimf
Created August 18, 2013 07:26
Show Gist options
  • Save wasimf/6260370 to your computer and use it in GitHub Desktop.
Save wasimf/6260370 to your computer and use it in GitHub Desktop.
The main.js module is the first code that gets executed and it is where you configure Durandal and tell it to start up the app.
requirejs.config({
paths: {
'text': '../Scripts/text',
'durandal': '../Scripts/durandal',
'plugins': '../Scripts/durandal/plugins',
'transitions': '../Scripts/durandal/transitions'
}
});
define('jquery', function () { return jQuery; });
define('knockout', ko);
define(['durandal/system', 'durandal/app', 'durandal/viewLocator'], function (system, app, viewLocator) {
system.debug(true);
app.title = 'Durandal Starter Kit';
app.configurePlugins({
router: true,
dialog: true,
widget: true
});
app.start().then(function() {
viewLocator.useConvention();
app.setRoot('viewmodels/shell', 'entrance');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment