title: Controller not registered after migrating to Angular 1.6.1 Component
body: <p>I am migrating from Angular 1.4.8 to 1.6.1 in preparation of migrating to Angular 2.  I  have been following Joe Eames' pluralsight steps for migrating to the latest version of Angular 1 (1.5+) prior to migrating to Angular 2.   I seem to have done everthing correctly but I am getting the error message, </p>
  
  <blockquote>
    <p>[$controller:ctrlreg] The controller with the name 'userLogin' is not
    registered.</p>
  </blockquote>
  
  <p>I have checked other Stack Overflow posts. One shows position of the reference to the controller in the scripts file so I moved the reference to the userLogin script up and problem persisted.  I have included my component code and the section of the routing that pertains to userLogin.  Note that I am using ui-router which may be causing the problem but not sure why.  Appreciate any suggestions on what I might be doing wrong.</p>
  
  <pre><code>userLogin.js
  (function () {
  'use strict';
  var app = angular.module('app',[]);
  angular.module('app').component('userLogin',{
      templateURL: '/account/userLogin.html',
      bindings: {
      },
      controller: function userLogin($http, flIdentity, flNotifier,flAuth, $state, flConstructQueryParameterService) {
          this.identity = flIdentity;
          //Take out both lines after testing - Do not even leave the variables
          this.username = "j.terranova@comcast.net";
          this.password = "joe";
          this.signin = function (username, password) {
              flAuth.authenticateUser(username, password).then(function (success) {
                  if (success) {
                      flConstructQueryParameterService.setOwnerId(flIdentity.currentUser._id);
                      flNotifier.notify('You have successfully signed in!');
                      console.log("login - successful signin see if currentUser is defined " + flIdentity.currentUser);
                  } else {
                      flNotifier.notify('Username/Password combination incorrect');
                  }
              });
              $state.go('home');
          }
  
          this.signout = function () {
              console.log('Signing User Out ');
              flAuth.logoutUser().then(function () {
                  this.username = "";
                  this.password = "";
                  flNotifier.notify('You have successfully signed out!');
                  $state.go('home');
              })
          };
  
          this.loadReferenceData = function () {
              console.log('Loading Reference Data ');
              $http.post("/loadReferenceData")
                  .then(
                      function (response) {
                          // success callback
                      },
                      function (response) {
                          // failure callback
                      }
                  );
          };
          this.signUp = function () {
              console.log("login - SignUp function");
              //$modalInstance.close();
              $state.go('signup');
          }
      }
      });
  })();
  
  --------------------------------------------------
  app.js
          .state('login', {
              url: '/login',
              views: {
                  'content-header': {
                      templateUrl: '/app/main/main-header',
                      controller: 'flMainCtrl',
                      caseInsensitiveMatch: true
                  },
                  'content-banner': {
                      templateUrl: '/app/main/main-carousel',
                      controller: 'flMainCtrl',
                      caseInsensitiveMatch: true
                  },
                  'content-main': {
                      template: '&lt;user-login&gt;&lt;/user-login&gt;',
                      //controller: 'login',
                      caseInsensitiveMatch: true
                  },
                  'content-left': {
                      templateUrl: '/app/main/main-menu-left',
                      controller: 'flMainCtrl',
                      caseInsensitiveMatch: true
                  },
                  'content-right': {
                      templateUrl: '/app/main/main-menu-right',
                      controller: 'flMainCtrl',
                      caseInsensitiveMatch: true
                  },
                  'content-footer': {
                      templateUrl: '/app/main/main-footer',
                      controller: 'flMainCtrl',
                      caseInsensitiveMatch: true
                  }
              }
          })
  </code></pre>