Created
December 9, 2014 18:47
-
-
Save trezy/6921367d042596731c89 to your computer and use it in GitHub Desktop.
TrezyTV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['backbone.intercept', 'marionette'], function(BackboneIntercept, Marionette) { | |
var App; | |
return App = (function(_super) { | |
__extends(App, _super); | |
function App() { | |
return App.__super__.constructor.apply(this, arguments); | |
} | |
App.prototype.onStart = function() { | |
Backbone.history.start({ | |
pushState: true | |
}); | |
return BackboneIntercept.start(); | |
}; | |
return App; | |
})(Backbone.Marionette.Application); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(['s/marionette.radio', 's/marionette.replaceElement', 'App', 'v/Root'], function(radioShim, replaceElementShim, App, RootView) { | |
var app; | |
app = new App; | |
app.rootView = new RootView; | |
window.app = app; | |
return app.start(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['marionette', 'v/Nav', 'hbs!tpl/root'], function(Marionette, NavView, rootTemplate) { | |
var Root; | |
return Root = (function(_super) { | |
__extends(Root, _super); | |
function Root() { | |
return Root.__super__.constructor.apply(this, arguments); | |
} | |
Root.prototype.tagName = 'body'; | |
Root.prototype.template = rootTemplate; | |
Root.prototype.regions = { | |
header: 'header', | |
main: 'main', | |
nav: 'nav' | |
}; | |
Root.prototype.initialize = function() { | |
console.log(this.nav); | |
return this.nav.show(new NavView); | |
}; | |
return Root; | |
})(Backbone.Marionette.LayoutView); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment