$ injector: modulerr

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

My page code:

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


            });

        </script>
    
asked by anonymous 24.04.2016 / 23:30

1 answer

2

It can be two things. 1: The checkConnection(); function is not defined and therefore breaks the rest of the javascript. 2: You needed to insert the contactController.js file into your html.

    
25.04.2016 / 00:38