RequireJS executing file code before dependencies are loaded/resolved?

Up vote 0 down vote favorite share g+ share fb share tw.

Requirejs seems to be allowing rels. Js to run before Rel is loaded. Https://github.com/yedi/Avalon/blob/backbone_rewrite/avalon/static/app/modules/collections/rels.js So Rel is undefined when I debug for it inside the initialize() function.

Model is also not being defined because Rel isn't defined. I can't seem to understand why this is happening. Other files that are requiring the same Rel model don't seem to have this issue.

(in both github.com/yedi/Avalon/blob/backbone_rew... and github.com/yedi/Avalon/blob/backbone_rew..., Rel is defined when I debug it. I require Rel the exact same way that I do inside rels. Js) I'm having this same issue with my items.

Js collection. Any help/suggestions on how I can debug this problem? (I have no idea how I would even tackle it and I've been banging my head on this problem for a few days.

) javascript backbone. Js require requirejs amd link|improve this question asked 16 hours agoy3di1616 94% accept rate.

You simply have a circular dependency. Your collection requires the child model and vice-versa. Kill the "modules/collections/rels" requirement in the child model, it should not need to know how it will be contained in a collection.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions