title: Controllers in AngularJS is not works. I use $StateProvider. Project on ASP.NET-Core
body: <p>I treid to make a contoller for each of my page but have a broblem. Mistakes in console, and the elements of controller don`t work on html page. </p>
  
  <p>I use $stateProvider cod below is the cod of config, it`s work normal.</p>
  
  <pre><code> var app = angular.module("appmyApp", ['ui.router']);
  
   app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider',
    function ($stateProvider, $urlRouterProvider, $locationProvider) {
  
       // For any unmatched url, redirect to root
       $urlRouterProvider.otherwise("/");
  
       $stateProvider
           .state('header', {
               abstract: true,
               templateUrl: '/app/pages/header.html'
           })
  
           .state('home', {
               url: '/',
               templateUrl: 'app/pages/home.html',
               controller: 'HomeController'
           })
  
  
  
   }]);
  </code></pre>
  
  <p>When I add in the config the row - controller: 'HomeController'. I have a mistake in console.</p>
  
  <pre><code>angularjs.js:127 Error: [$controller:ctrlreg] 
  http://errors.angularjs.org/1.7.5/$controller/ctrlreg?p0=HomeController
  at angularjs.js:7
  at angularjs.js:97
  at Object.&lt;anonymous&gt; (viewDirective.ts:410)
  at angularjs.js:17
  at Ba (angularjs.js:89)
  at q (angularjs.js:73)
  at g (angularjs.js:64)
  at angularjs.js:64
  at angularjs.js:69
  at n (viewDirective.ts:328) "&lt;div ui-view="" class="ng-scope"&gt;"
  </code></pre>
  
  <p>When I delete it, it is not any mostakes in console. </p>
  
  <pre><code>.state('home', {
               url: '/',
               templateUrl: 'app/pages/home.html'
           })
  </code></pre>
  
  <p>In both case page opens good. Route is work. But controller is not work.</p>
  
  <p>The cod of controller</p>
  
  <pre><code>var app = angular.module("appTradeRoom", []);
  app.controller("HomeController", function ($scope) {
  $scope.name = "Hello";
  });
  </code></pre>
  
  <p>But on the view I have this.</p>
  
  <p><a href="http://prntscr.com/lzeyy5" rel="nofollow noreferrer">http://prntscr.com/lzeyy5</a></p>
  
  <p>Scripts home-controller.js I added in the head of home.html</p>
  
  <pre><code>&lt;script src="/app/pages/home-controller.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I added ng-controller="HomeController" to body in html page home.html but it does not work. What a problem. I Use last angularJS</p>
  
  <p>Here is the reference on index.html</p>
  
  <p><a href="http://prntscr.com/lzf0cd" rel="nofollow noreferrer">http://prntscr.com/lzf0cd</a></p>