Advertisement
Guest User

Untitled

a guest
Jul 13th, 2015
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. define([
  2.   'jquery',
  3.   'underscore',
  4.   'backbone',
  5.   'views/specification/SpecificationView',
  6. ], function($, _, Backbone, SpecsView) {
  7.   var AppRouter = Backbone.Router.extend({
  8.     routes: {
  9.       '': 'defaultAction',
  10.     }
  11.   });
  12.  
  13.   var initialize = function(){
  14.  
  15.     var app_router = new AppRouter;
  16.     $('#backBoneContent').html("");
  17.  
  18.     app_router.on('route:defaultAction', function (actions)
  19.     {
  20.         var specsView = new SpecsView();
  21.         specsView.render();
  22.     });
  23.     Backbone.history.start();
  24.  
  25.   };
  26.   return {
  27.     initialize: initialize
  28.   };
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement