Lets have the following code:
( function($) { TeacherModel = Backbone.Model.extend({ defaults : { uid : -1, name : "" } }); TeachersCollection = Backbone.Collection.extend({ model : TeacherModel, url : function() { return "/path/to/api" + "/teacher"; } }); }());
I want to have "/path/to/api" as a global parameter for Backbone (I know that I can export it around the world to window , but I want to set it somewhere in Backbone)
Is there a way and for what is best?
source share