Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Controller name and directive name swapped: Controller 'fooBar', required by directive 'uiTreeNodes', can't be found! #7059

Closed
jrencz opened this issue Apr 9, 2014 · 4 comments

Comments

@jrencz
Copy link

jrencz commented Apr 9, 2014

I'm getting an error like this:

Controller 'fooBar', required by directive 'uiTreeNodes', can't be found!

fooBar is my own directive
uiTreeNodes is a directive (and a controller) in https://github.com/JimLiu/angular-ui-tree

I'm using 1.3.0-beta.5

it looks like strings have been swapped

@jrencz
Copy link
Author

jrencz commented Apr 9, 2014

More data:
I've got a directive barBaz which requires fooBar controller.
The correct error message should be

Controller 'fooBar', required by directive 'barBaz', can't be found!

It doesn't seem like names are swapped any more. It looks like directive name gets cached somehow and instead of the right directive name some other gets printed.

@caitp
Copy link
Contributor

caitp commented Apr 10, 2014

@jrencz can you test if my fix in #7067 fixes this for you? It should still throw an error, but the error message should no longer be incorrect.

@jrencz
Copy link
Author

jrencz commented Apr 10, 2014

@caitp yes it does fix the issue.

@caitp
Copy link
Contributor

caitp commented Apr 15, 2014

This should be fixed by 1192531

@caitp caitp closed this as completed Apr 15, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants