Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller 'uiGrid', required by directive 'uiGrid', can't be found! #2804

Closed
yahavger opened this issue Feb 18, 2015 · 13 comments
Closed

Controller 'uiGrid', required by directive 'uiGrid', can't be found! #2804

yahavger opened this issue Feb 18, 2015 · 13 comments

Comments

@yahavger
Copy link

i updated the ui-grid from

! ui-grid - v3.0.0-RC.18 - 2014-12-09 to * ui-grid - v3.0.0-rc.19 - 2015-02-11

and i got the error

Error: [$compile:ctreq] Controller 'uiGrid', required by directive 'uiGrid', can't be found!

what am i missing ?

@c0bra
Copy link
Contributor

c0bra commented Feb 18, 2015

How are you referencing ui-grid? Did you install it with bower?

Check your Network tab in developer tools, is ui-grid.js being loaded? Can you run angular.module('ui.grid'); successfully?

@yahavger
Copy link
Author

1.) yes i am refering to ui-grid.
2.) yes i install it with bower.
3.) i can see the ui-grid in the current version in the dev tools
4.) angular.module('ui.grid') run successfully

the only change i did in my project is updating ui-grid version from .18 to .19

i did some tests , and it seems that in fresh project it's work with no problem... i guess i have some conflicts between plugins.

@cosenmarco
Copy link

+1

I experience this problem as well. I have a nested grid and I believe this is generated by the directive "uiGrid" in the ui.grid.expandable module.

If I comment the following line (line 13724 in ui-grid.js) the error is gone, the nested grid is shown but I get many other errors along the way.

require: '^uiGrid'

I'm using angular 1.3.4 to test it

@c0bra
Copy link
Contributor

c0bra commented Feb 20, 2015

I can't reproduce it with this plunker: http://plnkr.co/edit/pfOCdkdI9zZ4lfgJC5GU?p=preview Any ideas?

@drmoose
Copy link

drmoose commented Feb 24, 2015

Try Firefox. The plunker you linked works fine in IE but dies in FF.

@c0bra c0bra self-assigned this Feb 24, 2015
@drmoose
Copy link

drmoose commented Feb 24, 2015

I've found setting the priority: of the ui.grid.expandable "uiGrid" directive to a negative number on line 284 of expandable.js is a viable workaround.

The idea being to force angular to run that directive it after the "uiGrid" directive from ui.grid, it seems to solve the problem for Firefox, IE, and Chrome.

@PaulL1 PaulL1 added this to the 3.0 milestone Feb 25, 2015
@devakone
Copy link

Any updates on this, it happens if i used a ng-if tag on a div containing the ui-grid directive.

@c0bra
Copy link
Contributor

c0bra commented Mar 30, 2015

@devakone Strange, the plunker forks fine for me in FF as well. I'm using v36.0.4. Can you check on your version?

@devakone
Copy link

I fixed it by setting the ng-if directive on a parent div!

@c0bra
Copy link
Contributor

c0bra commented Mar 30, 2015

OK, but I guess what I'm saying is that I'm not finding it necessary to do that to get that plunker to work...

@drmoose
Copy link

drmoose commented Mar 30, 2015

I concur that I can no longer reproduce it on the original plunkr, but @devakone is right about ng-if breaking it.

Here's a fork of your plunkr with no change other than an ng-if on the div: http://plnkr.co/edit/Xy9o9tXqwu2dQKwIFmCF?p=preview

Breaks on FF 36.0.4 for me, both with and without addons.

@devakone
Copy link

Thanks @drmoose, @c0bra that's indeed the behavior I am experiencing.

@c0bra
Copy link
Contributor

c0bra commented Mar 30, 2015

OK I found it. ngIf runs with priority 600 and the expandable feature stacks uiGrid with a directive that runs at 1000: https://github.com/angular-ui/ng-grid/blob/master/src/features/expandable/js/expandable.js#L284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants