Reputation:
I cannot load the main module of my Angular website. I get no errors on gulp, but try to open the website I can see this on the console.
Uncaught Error: [$injector:nomod] Module 'myproject-ui' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Where should I be looking at for this error?
The var myApp = angular.module('myproject-ui', [])
looks correct.
Upvotes: 1
Views: 744
Reputation: 933
look for places using your module angular.module('myproject-ui')
before you have declared your module angular.module('myproject-ui', [])
Make sure that the script file declaring your module is included on the page before any scripts that use it.
Upvotes: 3