JavaScript Angular 1.4.8 Error: [$injector:modulerr] angular error injector modulerr,angular error injector unpr,angular error

I am unable to find/pinpoint the root cause of the error. In my javascript file I keep getting a green squiggly under the the word angular. I don't understand why. (Im using Visual Studio Code)

HTML

<html ng-app="myapp">
        <head>
            <title>Hello</title>

            <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
                    <script type="text/javascript" src="C:\Users\john\Desktop\test.js"/>

        </head>
        <body >
            <div>
                <label>Name:</label>
                <input type="text" ng-model="yourName" placeholder="Enter name here">

                <h1> Hello, {{yourName}}</h1>

                <div ng-controller="HelloController">
                    <h2>Say hello to {{helloTo.title}} </h2>
                    </div>


         </body>
    </html>

Javascript

(function(){
var app = angular.module('myapp', ['ngRoute']);

app.controller("HelloController", function($scope){
    $scope.helloto={};
    $scope.helloto.title="AngularJS";

});

})();

ERROR

 Uncaught Error: [$injector:modulerr]  http://errors.angularjs.org/1.4.8/$injector/modulerr?p0=myapp&p1=Error%3A%20%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.4.8%2F%24injector%2Fnomod%3Fp0%3Dmyapp%0A%20%20%20%20at%20Error%20(native)%0A%20%20%20%20at%20https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A6%3A416%0A%20%20%20%20at%20https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A24%3A186%0A%20%20%20%20at%20b%20(https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A23%3A251)%0A%20%20%20%20at%20https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A23%3A494%0A%20%20%20%20at%20https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A38%3A117%0A%20%20%20%20at%20n%20(https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A7%3A333)%0A%20%20%20%20at%20g%20(https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A37%3A488)%0A%20%20%20%20at%20eb%20(https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A41%3A249)%0A%20%20%20%20at%20c%20(https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.4.8%2Fangular.min.js%3A19%3A463
Answer:1

You are missing the javascript file for ng-route.

https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-beta.2/angular-route.min.js

That is the cdn for it. Load it in and it should work.

Answer:2

You have to refer the script for ng-route

 <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular-route.js">
Answer:3

Sorry for silly question but I am new to AngularJS. I have a service which will fetch data to HTML page (login.html) in AngularJS. I have login.html page which will have this data when loading. In ...

Sorry for silly question but I am new to AngularJS. I have a service which will fetch data to HTML page (login.html) in AngularJS. I have login.html page which will have this data when loading. In ...

I am trying to add a span after dynamically generated table, but the span is getting added before the contents of table are getting loaded. Below is my code: <!DOCTYPE html> <html> <...

I am trying to add a span after dynamically generated table, but the span is getting added before the contents of table are getting loaded. Below is my code: <!DOCTYPE html> <html> <...

  1. insert span in input
  2. insert span in h1 jquery
  3. insert span in html
  4. insert in span jquery

Is there a way of attaching custom Parsley validators to one form instance only? The only thing I've found is ParsleyValidator.addValidator(), but that makes them globally available (which in turn ...

Is there a way of attaching custom Parsley validators to one form instance only? The only thing I've found is ParsleyValidator.addValidator(), but that makes them globally available (which in turn ...

  1. parsley custom validator not working
  2. parsley custom validator example
  3. parsley custom validator
  4. parsley custom validator message
  5. parsley custom validator regex
  6. parsley custom validator get element
  7. parsley custom validator date
  8. parsley custom validator priority
  9. parsley js custom validator
  10. parsley add custom validator
  11. data parsley custom validator

I have some HTML that looks like this: <div class="primary-billing"> <div>1</div> <div>4</div> <div>3</div> <div>10</div> <div>5&...

I have some HTML that looks like this: <div class="primary-billing"> <div>1</div> <div>4</div> <div>3</div> <div>10</div> <div>5&...

  1. group html element
  2. row group element html
  3. template_preprocess_field group html element