Skip to content

Instantly share code, notes, and snippets.

@jccrosby
Created July 24, 2012 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jccrosby/3172409 to your computer and use it in GitHub Desktop.
Save jccrosby/3172409 to your computer and use it in GitHub Desktop.
Backbone/Require View Module Definitions
define(
[
// Template
'text!tpl/HomeView.tpl'
// Control
'realeyes/control/Dispatcher'
// Model
'realeyes/model/AppModel'
// View
'realeyes/view/HomeView.js'
// Util
],
function( template, dispatcher, appModel, HomeView ) {
var HomeView = Backbone.View.extend( {
// =====================================
// Properties
// =====================================
viewName: HomeView, // add a viewName prop
events: {
'click #myButton': 'onClickMyButton'
},
// =====================================
// Init
// =====================================
initialize: function() {
}
// =====================================
// Control Methods
// =====================================
// =====================================
// Handlers
// =====================================
}
);
return HomeView;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment