Circular Dependency in Backbone / RequireJS Nested List
问题 I'm setting up a nested categories structure in Backbone with RequireJS. In this structure, a categories collection contains category models, and a single category model can contain a categories collection. Unfortunately this seems to cause the dreaded circular dependencies problem in RequireJS. I have read the docs on RequireJS (http://requirejs.org/docs/api.html#circular) however I am finding the explanation with 'a' and 'b' confusing. Here is my code, which is causing the problem: define([