Thursday, April 13, 2017

circular references in Angular 1 errors

This can happen when looping services in at services. The errors that come up to the console look like this:

Uncaught Error: [$injector:cdep] Circular dependency found: foo <- bar <- baz <- qux
      <- foo

 
 

You would be handing bar, baz, or qux or whatever foo needs into a function signature at foo to get around this.

No comments:

Post a Comment