-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following your example I'm not sure if 'Book' should point to the model #49
Comments
What's your Backbone.JJStore look like when this fails? |
I'm not sure about Backbone.JJStore. I have managed to get it to work but I can't use them in external AMD modules I am having to use the them inline which is not ideal. I assume this is a scope issue but I haven't figured it out yet. It works inline, not from different AMD modules pulling into one file for use. |
I think you'll have to require() all your collections in the very beginning You can see why AMD is not officially supported :) Are you actually going to asynchronously load all modules in production? If I'll try to get up a working code example of this later if I can.
|
Thanks @sarink I appreciate the example. I think AMD isn't hard to get working you just need to Shim the plugin if you document this I think it will be enough, there isn't a huge need for more but it would be nice. |
Try this requirejs.config.js
my-backbone.js
application.js
collections/BookList.js
models/Book.js
Creating a Although if you hate this solution, I understand why. But I think it might be as good as it's gonna get. To be completely honest, I've not written a Backbone app in some time. React+Flux is the way to go, imo. You may get better support from using one of the more popular BB Relational libraries (although, I've tried them all, and was always met with great pain. I do have a couple of apps running in production still today with JJRelational, but you should think hard about this decision before it's too late.) Good luck. |
Uncaught TypeError: relatedModel "Book" is neither a reference to a JJRelationalModel nor a string referring to an object in the global oject
The text was updated successfully, but these errors were encountered: