Created
March 18, 2011 15:08
-
-
Save meleyal/876225 to your computer and use it in GitHub Desktop.
simple backbone example
This file contains 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
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