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

Error: uiGridRenderContainer is not a function with ui.grid #67

Closed
sarg3nt opened this issue Sep 26, 2014 · 10 comments
Closed

Error: uiGridRenderContainer is not a function with ui.grid #67

sarg3nt opened this issue Sep 26, 2014 · 10 comments
Labels

Comments

@sarg3nt
Copy link

sarg3nt commented Sep 26, 2014

I had it working with ngGrid but wanted to try uiGrid as it is replacing ngGrid and does not require jQuery (this is for a site that we are developing and thus not in production)
I've tried several different things but keep getting the following:
Error: [ng:areq] Argument 'uiGridRenderContainer' is not a function, got undefined http://errors.angularjs.org/1.3.0-rc.3/ng/areq?p0=uiGridRenderContainer&p1=not%20a%20function%2C%20got%20undefined minErr/<@https://davesargpc.ad.selinc.com/scripts/angular.js:80:5

I got uiGrid up and running without ocLazyLoad and RequireJs but once I add them into the mix and try to lazy load the module I get the above error.
Is this a bug with uiGrid or something uiGrid is doing that makes it incompatible with ocLazyLoad or maybe something that needs to be added to ocLazyLoad

I tried looking through the uiGrid code but just don't know enough about how the module loading works to understand what might be wrong.

Versions:
ui-grid - v3.0.0-rc.11 - 2014-09-26
ocLazyLoad version v0.3.8

@sarg3nt
Copy link
Author

sarg3nt commented Sep 26, 2014

As an update I just did a one for one conversion of examples/sample2 in the ocLazyLoad source from ngGrid to uiGrid and get the same error.
I did check to make sure it worked before converting. The changes are quite simple so don't think I messed anything up.

@ocombe
Copy link
Owner

ocombe commented Sep 27, 2014

Ok I'll check that out monday and try to find where the problem is

@sarg3nt
Copy link
Author

sarg3nt commented Sep 27, 2014

Thank you Olivier!

On Fri, Sep 26, 2014 at 9:17 PM, Olivier Combe notifications@github.com
wrote:

Ok I'll check that out monday and try to find where the problem is


Reply to this email directly or view it on GitHub
#67 (comment).

David L. Sargent
dsargent@gmail.com

"I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I --
I took the one less traveled by,
And that has made all the difference."
-Frost

@ocombe
Copy link
Owner

ocombe commented Sep 30, 2014

I can reproduce the error, but I have no idea why it is not working.
The uiGridRenderContainer is injected and loaded and should not be undefined.
It is probably a question of loading order (some components get loaded in the wrong order and get undefined on requires because what they require is not loaded yet).

@sarg3nt
Copy link
Author

sarg3nt commented Sep 30, 2014

OK. I'll submit a bug on the UIGrid site, see if they can take a look maybe optimize something to work better with ocLazyLoad.

@ocombe
Copy link
Owner

ocombe commented Sep 30, 2014

I don't think that there is an error on their side, just maybe some weird use case that I don't take into account

@sarg3nt
Copy link
Author

sarg3nt commented Sep 30, 2014

Are you looking into it further or is this a lost cause?

@ocombe
Copy link
Owner

ocombe commented Sep 30, 2014

I'll try to fix it because ui-grid is gonna be an important library, and because I want ocLazyLoad to work with any angular library :)
But I don't know when (october is gonna be a very busy month for me)

@ocombe ocombe added the bug label Sep 30, 2014
@mohlsen
Copy link

mohlsen commented Oct 3, 2014

I ran into this issue as well. I am on Angular 1.2.21 instead of the 1.3 RC listed above. Using UI-Grid 3.0.0-rc.11.

For the googlers out there searching for this issue, here is the full console log when it occurs:

ui-grid controller angular.js:10023
Creating raise event method core.raise.renderingComplete angular.js:10023
Creating on event method core.on.renderingComplete angular.js:10023
Creating raise event method core.raise.sortChanged angular.js:10023
Creating on event method core.on.sortChanged angular.js:10023
ui-grid-style link angular.js:10023
ui-grid postlink angular.js:10023
Error: [ng:areq] http://errors.angularjs.org/1.2.21/ng/areq?p0=uiGridRenderContainer&p1=not%20aNaNunction%2C%20got%20undefined
at Error (native)
at http://localhost:3002/lib/angular/angular.min.js:6:450
at Db (http://localhost:3002/lib/angular/angular.min.js:18:497)
at Ua (http://localhost:3002/lib/angular/angular.min.js:19:78)
at http://localhost:3002/lib/angular/angular.min.js:67:237
at http://localhost:3002/lib/angular/angular.min.js:53:362
at q (http://localhost:3002/lib/angular/angular.min.js:7:392)
at M (http://localhost:3002/lib/angular/angular.min.js:53:227)
at http://localhost:3002/lib/angular/angular.min.js:60:436
at http://localhost:3002/lib/angular/angular.min.js:72:45 angular.js:10023
loading cols in dataWatchFunction angular.js:10023
buildColumns angular.js:10023
Creating raise event method core.raise.rowsVisibleChanged angular.js:10023
Creating on event method core.on.rowsVisibleChanged

@ocombe ocombe closed this as completed in f981c33 Nov 2, 2014
@ocombe
Copy link
Owner

ocombe commented Nov 2, 2014

It's fixed in 0.3.9.
It turns out that the problem was that ui-grid uses the same name for 2 different directives (from different modules) and for 1 directive and 1 controller (from the same module).
It's weird to do that, but it's valid from Angular's point of vue. That's why they are now allowed by ocLazyLoad !

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

No branches or pull requests

3 participants