title: The controller with the name '..' is not registered
body: <p>Im using AngularJS 1.6 and have a problem with routing, where Controller is unregistered, although it seemed that there was no problem. Tried different solutions, but they did not help.</p>
  
  <p><b>products.html</b></p>
  
  <pre><code>&lt;div ng-controller="ProductController"&gt;
      &lt;div class="container"&gt;
           &lt;div class="row"&gt;
              &lt;div class="item col-sm-6 col-md-4 col-lg-3" ng-repeat="product in products"&gt;
                  &lt;h3&gt;{{product.title}}&lt;/h3&gt;
                  &lt;img class="product-photo" src="{{product.photoURL}}" alt=""&gt;
                  &lt;p&gt;{{product.price}}&lt;/p&gt;
                  &lt;button class="btn btn-cart" (click)="onAddToCart()"&gt;Add to cart&lt;/button&gt;
              &lt;/div&gt; 
          &lt;/div&gt;
       &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Controller</p>
  
  <p><b>ProductController.js</b></p>
  
  <pre><code> var testApp = angular.module('testApp');
   testApp.controller('ProductController',function ProductController($scope,$http) {
      $scope.products = [
         { id:1, title: 'Margarita', photoURL:'...',price:'260 UAH'},
         { id:2, title: 'Margarita', photoURL:'...', price:'240 UAH'},
         { id:3, title: 'Margarita', photoURL:'...', price:'200 UAH'},
         { id:4, title: 'Margarita', photoURL:'...', price:'190 UAH'}
      ]; 
  });
  </code></pre>
  
  <p>Routing </p>
  
  <p><b>app-routing.js</b></p>
  
  <pre><code>var questApp = angular.module('testApp', ["ngRoute"])
      .config(function($routeProvider){
          $routeProvider.when('/products',
          {
              templateUrl:'./views/products.html',
              controller:'ProductController'
          });
          $routeProvider.when('/cart',
          {
              templateUrl:'./views/cart.html',
              controller:'CartController'
          });
          $routeProvider.otherwise({redirectTo: '/products'});
  });
  </code></pre>
  
  <p><b>index.html</b></p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html ng-app="testApp"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"&gt;
  &lt;link href="https://fonts.googleapis.com/css?family=Bungee+Inline|Cabin+Sketch|Fredericka+the+Great|Love+Ya+Like+A+Sister|Rancho|Roboto" rel="stylesheet"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;nav&gt;&lt;a href="#!/products"&gt;Products&lt;/a&gt;|&lt;a href="#!/cart"&gt;Cart&lt;/a&gt;&lt;/nav&gt;
  &lt;ng-view&gt;&lt;/ng-view&gt;
  &lt;script src="https://code.angularjs.org/1.6.0/angular.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.angularjs.org/1.6.0/angular-route.min.js"&gt;&lt;/script&gt;
  &lt;script src="./js/ProductController.js"&gt;&lt;/script&gt;
  &lt;script src="./js/CartController.js"&gt;&lt;/script&gt;
  &lt;script src="./js/app-routing.js"&gt;&lt;/script&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>