AngularJs Error: $injector:nomod Module is not available - Free Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server,WCF,Entity framework snippets and tutorial

AngularJs Error: $injector:nomod Module is not available

I have got an error while working with AngularJs. Error is:
angular.js:4587 Uncaught Error: [$injector:modulerr] Failed to instantiate module mvcapp due to:
Error: [$injector:nomod] Module 'mvcapp' 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.

AngularJs Error $injectornomod Module is not available


This error occurs because I have not defined the module.

Solution:

To solve this error I have call the angular module as shown below:

<script>
    var angular = angular.module('mvcapp', []);
</script>
OR

 <script>
 var angular = angular.module('mvcapp');
</script>


What do you think about this article?

If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.

Share this

Share on FacebookTweet on TwitterPlus on Google+


EmoticonEmoticon