Skip to content

Instantly share code, notes, and snippets.

@meleyal
Created March 18, 2011 15:08
Show Gist options
  • Save meleyal/876225 to your computer and use it in GitHub Desktop.
Save meleyal/876225 to your computer and use it in GitHub Desktop.
simple backbone example
var App = {
initialize: function() {
new App.Controller();
Backbone.history.start();
}
};
App.Controller = Backbone.Controller.extend({
routes: {
"":"index"
},
index: function(){
new App.IndexView();
}
});
App.IndexView = Backbone.View.extend({
el: $("#restaurantapp"),
...
});
$(document).ready(function(){
App.initialize();
)};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment