title: Can't access controller properties in view with UI router and 'controller as' syntax
body: <p>I am using ui-router for my routing, and am going to be using nested scopes and therefore want to be using the 'controller as' syntax. However, I can't work out the correct syntax / combinations to access the controller object properties in my view.</p>
  
  <p><strong><code>app.js (sets up routing)</code></strong></p>
  
  <pre><code>(function() {
  
      angular
  
      .module('ICP_App', ['ui.router', 'satellizer', 'ngMaterial', 'ngMessages', 'xeditable'])
  
          .config(function($stateProvider, $urlRouterProvider, $authProvider) {
  
              $urlRouterProvider.otherwise('dashboard');
  
              $stateProvider
                  .state('clients', {
                      url: '/clients',
                      templateUrl: '../partials/clients-index.html',
                      controller: 'ClientsController as ClientsCtrl'
              })
              // more routes here...
  
  })();
  </code></pre>
  
  <p><strong><code>ClientsController.js</code></strong></p>
  
  <pre><code>(function() {
  
      angular.module('ICP_App')
          .controller('ClientsController', function($http) {
              $http.get('http://api.icp.sic.com/clients')
                  .success(function(clients) {
                      var vm = this;
                      vm.clients = clients.data;
                      console.log(vm.clients);
                  })
                  .error(function(error) {
                      // handle here
                  })
          });
  
  })();
  </code></pre>
  
  <p><strong><code>index.html</code></strong></p>
  
  <pre><code>&lt;body ng-app="ICP_App" ng-cloak&gt;
  
  &lt;!-- sidebar, header etc --&gt;
  
      &lt;div ui-view&gt;&lt;/div&gt; &lt;!-- pull in view --&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Finally, <strong><code>clients-index.html</code></strong> partial</p>
  
  <pre><code>&lt;div class="content"&gt;
      &lt;div class="pane" ng-repeat="client in clients"&gt;
          {{ client.name }}
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have also tried <code>client in vm.clients</code>, to no avail.</p>
  
  <p>Is there a problem with my controller as syntax? As I am using controller as in my ui-router code, yet not again when creating my controller. If I use controller as again in my controller, it errors (<code>Argument ClientsController is not a</code>).</p>
  
  <p>I should point out that console logging vm.clients does give me the data in the console, I just can't seem to access it in my view.</p>
  
  <p>Thanks in advance.</p>