Status of RequireJS and Backbone-Relational and/or Alternative to Backbone-Relational?

StackOverflow https://stackoverflow.com/questions/17078757

  •  31-05-2022
  •  | 
  •  

質問

Preface- I recently learned about Backbone-Relational because I was interested in finding some sort of framework for working with nested backbone models.

Problem- Console Warning:

Relation = r : missing model, key or relatedModel (function (){return i.apply(this,arguments)}, "models", undefined).

Comments- I've done some research and apparently it's a scope issue and there are ways of resolving the warning but as far as I'm aware nothing official.

Question- Is there any official in depth documentation for dealing with requirejs compatibility?

-OR-

Is there a requireJS savvy alternative?

役に立ちましたか?

解決

There is a lightweight alternative to Backbone-relational here called backbone associate

https://github.com/rjz/backbone.associate

Also on their page they list for more control

https://github.com/pathable/supermodel

I'm not sure how they will play with r.js but it's definitely worth a shot, backbone.associate looks promising for you!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top