0

When I launch my angularjs application I am getting this error

Uncaught Error: [$injector:nomod] Module 'App' 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. http://errors.angularjs.org/1.3.11/$injector/nomod?p0=App

As I have about 20 dependencies. How can I know which dependency is not satisfied?

angular.module('myApp', ['LocalStorageModule', 'tmh.dynamicLocale','ngResource', 'ui.router',   
'ngCookies','pascalprecht.translate', 'ngCacheBuster', 'ngTable',   
'ngSanitize','ui.select','angularValidator','ui.bootstrap','googlechart',   
'ui.bootstrap.showErrors','ngActivityIndicator','ncy-angular-breadcrumb',
'anguFixedHeaderTable', 'ui.utils','io.dennis.contextmenu'])
3
  • share your angular.module statement? Commented Mar 18, 2016 at 7:54
  • trace it even if its 20, dont be lazy Commented Mar 18, 2016 at 7:55
  • how? by removing them one by one et relaunch the app? Commented Mar 18, 2016 at 7:57

2 Answers 2

4

Angular is trying to load a module called app. As your code looks like, you define your module name as myApp - so just rename one of them to archieve name equality.

EG:

angular.module('app', ['LocalStorageModule', 'tmh.dynamicLocale','ngResource', 'ui.router',   
'ngCookies','pascalprecht.translate', 'ngCacheBuster', 'ngTable',   
'ngSanitize','ui.select','angularValidator','ui.bootstrap','googlechart',   
'ui.bootstrap.showErrors','ngActivityIndicator','ncy-angular-breadcrumb',
'anguFixedHeaderTable', 'ui.utils','io.dennis.contextmenu'])
Sign up to request clarification or add additional context in comments.

Comments

1

I don't think this is a dependency issue but simply a naming issue. Make sure your ng-app statement is correct in your HTML. By the looks of it your statement is probably ng-app="App" instead of ng-app="myApp".

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.