0

Can anyone help me understand this error? TIA

TypeError: AppView is not a constructor [Break On This Error] var apView = new AppView();

define([
    'jquery',
   'backbone',
   'collections/Directory',
   'views/app',
   'common'
   ]   , function( $, Backbone, DirectoryCollection,AppView , Common ) {

var Workspace = Backbone.Router.extend({
    routes:{            
        "filter/:type": "urlFilter"
    },      

urlFilter: function (type) {            
        var apView = new AppView();
        apView.filterType = type;
        apView.trigger("change:filterType");          
    },

});
return Workspace;

});
koko
  • 31
  • 2
  • 6
  • This may provide direction - [link](http://stackoverflow.com/questions/5655367/javascript-error-is-not-a-constructor) – imrane Oct 01 '12 at 05:01

1 Answers1

0

Is AppView either in scope or attached to the window object, as well as extending Backbone.View?

Jordan Denison
  • 2,649
  • 14
  • 14