You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that when I build with r.js into a single file I always get the message 'Please include Backbone.ModelBinder.js before Backbone.CollectionBinder.js' although requirejs works fine before the build when multiple files are loaded. I have realised that CollectionBinder makes a call to the anonymous function doing
.call(this, _, jQuery, Backbone)
whereas ModelBinder does not do this so that although ModelBinder is being loaded before CollectionBinder the code to create the ModelBinder attributes has not been run. I have changed my ModelBinder signature to look the same as CollectionBinder and added the
.call(this, _, jQuery, Backbone)
now it works fine. Not sure if this call should be handled by requirejs but would like some clarification of a long term fix.
Many thanks
The text was updated successfully, but these errors were encountered:
I have noticed that when I build with r.js into a single file I always get the message 'Please include Backbone.ModelBinder.js before Backbone.CollectionBinder.js' although requirejs works fine before the build when multiple files are loaded. I have realised that CollectionBinder makes a call to the anonymous function doing
.call(this, _, jQuery, Backbone)
whereas ModelBinder does not do this so that although ModelBinder is being loaded before CollectionBinder the code to create the ModelBinder attributes has not been run. I have changed my ModelBinder signature to look the same as CollectionBinder and added the
.call(this, _, jQuery, Backbone)
now it works fine. Not sure if this call should be handled by requirejs but would like some clarification of a long term fix.
Many thanks
The text was updated successfully, but these errors were encountered: