title: AngularJS ui-router resolve not working
body: <p>I have a problem with my resolve into my ui router state.</p>
  
  <p>The template is rendered before the resolve and I can't figure why.</p>
  
  <p>Here are the states :</p>
  
  <pre><code> .state({
              name: 'common.list',
              url: '/lists/list/:id',
              templateUrl: 'scripts/lists/crud/crud.html',
              controller: 'ListsCrudController',
              controllerAs: 'vm',
              ncyBreadcrumb: {
                  label: '{{ vm.title }}',
                  parent: 'common.lists'
              }
          })
          .state({
              name: 'common.list.new',
              url: '/new',
              templateUrl: 'scripts/lists/crud/crudForm.html',
              resolve: {
                  entityMetadata: function ($http, $stateParams) {                        
                      return $http.get('//localhost/IRE.Scanning.Services/api/FormMetadata/' + $stateParams.id + 'DefaultForm')
                          .then(function (response) {
                              return response.data;
                          });
                  }
              },
              controller: 'ListsCrudFormController',
              controllerAs: 'ctrl',
              ncyBreadcrumb: {
                  label: 'Nouveau'
              }
  
          });
  </code></pre>
  
  <p>The controller :</p>
  
  <pre><code>class ListsCrudFormController {       
      entityMetadata: any;
      constructor(entityMetadata: any) {
          this.entityMetadata = entityMetadata;
  
      }
  </code></pre>
  
  <p>Do anyone have an idea about my issue?</p>
  
  <p>Thank you very much</p>