$injector:modulerr

Asked

Viewed 572 times

0

I get the following error:

angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module contato due to:  

Error: [$injector:nomod] Module 'contato' 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.4.6/$injector/nomod?p0=contato

Code of my page:

<script>
          checkConnection();
            angular.module("contato", []);
            angular.module("contato").controller("contatoCtrl", function($scope){
                $scope.message="+ cont";


            });

        </script>

1 answer

2


It can be two things. 1: The function checkConnection(); is not defined and therefore breaks the rest of javascript. 2: failed to insert the contact file in your html.

  • I removed the function and the <script></script> with the inclusion, and it worked. It was a normal javascript function, probably why it didn’t work

Browser other questions tagged

You are not signed in. Login or sign up in order to post.