2

After i was adding an extra dependency in my module, the whole thing just crashed in the browser (unable to do anything).

Error: [$injector:modulerr] Failed to instantiate module myAppRename due to:
[$injector:modulerr] Failed to instantiate module myAppRename.view2 due to:
[$injector:modulerr] Failed to instantiate module ngMessages due to:
[$injector:nomod] Module 'ngMessages' 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    

It was after adding ng-message to my module, but it seems like it is a generally problem with all kinds of dependencies.

This is what my module looks like:

angular.module('myAppRename.view2', ['ngRoute', 'ngMessages'])    

What am i doing wrong here?

2
  • did you include the script? angular-messages.js? Commented Dec 2, 2014 at 21:30
  • can you please give the entire code in your app.js?. Commented Dec 2, 2014 at 22:43

1 Answer 1

4

I ran into this same problem and the error was that I had forgotten to add the angular-messages script to my site:

<script type="text/javascript" src="/js/lib/angular/1.3.9/angular-messages.min.js"></script>
Sign up to request clarification or add additional context in comments.

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.