http://backbonejs.org/
Tutorial
http://www.youtube.com/watch?v=HsEw2i4wQMM
JS cloud
http://cdnjs.com/index.html
var route = new Router();
route.on('route:home', function(){
console.log("we have load homepage");
});
start
Backbone.history.start([options])
When all of your Routers have been created, and all of the routes are set up properly, call Backbone.history.start() to begin monitoring hashchange events, and dispatching routes.
--> nếu k có hàm start thì sẽ k chạy route
Không có nhận xét nào:
Đăng nhận xét