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

ngload problem when combined with grunt-contrib-requirejs #173

Open
nicomelchiori opened this issue Jul 20, 2016 · 1 comment
Open

ngload problem when combined with grunt-contrib-requirejs #173

nicomelchiori opened this issue Jul 20, 2016 · 1 comment

Comments

@nicomelchiori
Copy link

Hi,
I wrote an entire app using this library and everything works great in development environment, having all requirejs module in an individual file.
I'm having problem when trying to optimize all modules. I'm currently using grunt-contrib-requirejs task for doing that.
This is the error I'm getting

Running "requirejs:compileApp" (requirejs) task
 TypeError: Cannot read property 'processQueue' of undefined
 In module tree:
     calendar/calendar.controller.index
       ngload

{ [Error: TypeError: Cannot read property 'processQueue' of undefined
In module tree:
    calendar/calendar.controller.index
      ngload
    at eval (eval at <anonymous> (/app/node_modules/grunt-contrib-requirejs/node_modules/requirejs/bin/r.js:24556:38), <anonymous>:13:25)
]
  originalError: 
   { [TypeError: Cannot read property 'processQueue' of undefined]
     moduleTree: [ 'ngload', 'calendar/calendar.controller.index' ],
     fileName: '/app/dist/app/ngload.js' } }

For some strange reason, ngload.js is being evaluated without injecting angularAMD dependency. If I check before angularAMD.processQueue(); if angularAMD is defined everything works as expected. Any clue on why this happens?

@marcoslin
Copy link
Owner

Can you share some sample code? Make sure to include your main.js.

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

No branches or pull requests

2 participants