title: Variable in controller is always undefined in View - AngularJS
body: <p>I am using es6 AngularJS and has this code declaring a simple variable</p>
  
  <pre><code>export default class HomeCtrl {
      constructor() {
          'ngInject';
  
          this.num = [1,2];
      }
  }
  </code></pre>
  
  <p>in the view I just have </p>
  
  <pre><code>&lt;span&gt;{{ vm.num === undefined }}&lt;/span&gt;
  </code></pre>
  
  <p>but it always says <code>true</code></p>
  
  <p>I am using this config so I am not sure what causing the issue</p>
  
  <pre><code>$stateProvider
    .state('app.home', {
      url: '/',
      controller: 'HomeCtrl',
      contollerAs: 'vm',
      template: homeView,
    });
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I found out that it conflict with the AppCtrl that I specify this is my whole config code </p>
  
  <pre><code>export default angular.module('app', [
    ngTouch,
    ngSanitize,
    uiRouter,
    animations,
    directives,
    services,
    controllers,
    components,
  ])
  .config(function($stateProvider, $locationProvider, $urlRouterProvider) {
    'ngInject';
  
    $stateProvider
      .state('app', {
        abstract: true,
        controller: 'AppCtrl',
        controllerAs: 'vm',
        template: appView,
      })
      .state('app.home', {
        url: '/',
        controller: 'HomeCtrl',
        contollerAs: 'vm',
        template: homeView,
      });
  
    $urlRouterProvider.otherwise('/');
  
    $locationProvider.html5Mode(true);
  }).name;
  </code></pre>
  
  <p>when I use the vm in the homeView.html, the vm that was called was the vm of AppCtrl which is my parent controller</p>