define([ 'jquery', 'underscore', 'backbone', 'app', 'models/sessionmodel', 'views/home/homeview', ], function( $, _, backbone, app, sessionmodel, homeview ){ approuter = backbone.router.extend({ initialize: function(options){}, routes : { '' :'showhome', }, showhome : function(){ this.show(new homeview()); }, }); return approuter; }); and here main first hit per backbone standards. have file called app created empty object , returns it... require.config({ paths: { jquery: 'libs/jquery/jquery-1.8.2', underscore: 'libs/underscore/underscore-min', backbone: 'libs/backbone/backbone-1.0.0-min', text: 'libs/require/text', router: 'router', app: 'app' }, shim: { jquery: { exports: '$' }, underscore: { exports: '_' }, backbone: ...
Comments
Post a Comment