This fork adds AMD support so you can load backbone-tastypie.js using a require library like requirejs.
This software assumes you are using the AMD optimised version of backbone. This is required because backbone-tastypie-amd will rely on backbone being a registered module with its own requirements (such as underscore) defined.
- Ensure that your main.js knows the paths of backbone (the AMD optimised version!) and backbone-tastypie. For example:
- When you need backbone-tastypie simply call:
// This code loads when backbone-tastypie and all of its dependencies are loaded.
// The local backbone variable is the modified backbone-tastypie one.
// If you want vinalla backbone, you can just change [“backbone-tastypie”] to [“backbone”]!