jquery - Backbone Router doesn't appear to correctly Extending Router -
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: { deps: ["underscore", "jquery"], exports: "backbone" } } }); require(['app','router', 'models/sessionmodel'], function(app, approuter, sessionmodel) { app.router = new approuter(); app.session = new sessionmodel(); app.session.checkauth({ complete: function(){ backbone.history.start(); } }); });
when console log this, router missing default methods (specifically navigate, in addition others on, off, trigger, etc.).
it seems don't check __proto__
property of logged object:
Histogram of grayscale image python
ReplyDeleteHow to insert Unicode characters in mysqli using PHP
How to Embed PDF Document in HTML using Javascript
Histogram equalization OpenCV Python
Matplotlib pie chart
How to verify password in PHP from database
Arden's Theorem
fibonacci series in php
How to display pdf file in PHP from database