Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var movieView = Backbone.View.extend({
- template: Handlebars.compile( $("#movie-template").html() ),
- initialize: function () {
- this.render();
- },
- render: function () {
- this.$el.html(this.template({title:"Welcome to Backbone!"}));
- }
- });
- /*
- var AppRouter = Backbone.Router.extend({
- routes: {
- '': 'homeRoute',
- 'home': 'homeRoute',
- 'about': 'aboutRoute',
- },
- homeRoute: function () {
- var movieView = new movieView();
- $("#content").html(movieView.el);
- },
- aboutRoute: function () {
- var aboutView = new AboutView();
- $("#content").html(aboutView.el);
- }
- });
- var appRouter = new AppRouter();
- Backbone.history.start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement