title: Angular : $stateParams getting same object 2 times
body: <p>I have a button to open a modal.
  This modal is opening twice (overlaying the other) and I can't figure out why.
  Maybe this is a very simple problem, but i'm new to angular.
  I realized that the <code>$stateParams</code> variable  is getting the object 2 times instead of 1 . here the console.log output : </p>
  
  <pre><code>Object { page: "1", sort: "id,asc", search: null, month: "", ope: "", codeAr: "", reIsus: Array[1] }
  Object { page: "1", sort: "id,asc", search: null, month: "2016/12", ope: "", codeAr: "", reIsus: Array[1] }
  </code></pre>
  
  <p>The item in <code>array[1]</code> is the same in both line
  and</p>
  
  <pre><code>        .state('validate', {
          url: '/validate',
          data: {
              authorities: ['ROLE_USER']
          },
          params: {
              reIsus: {
                  array: true
              }
          },
          onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {
              console.log($stateParams)
              if(!$stateParams.reIsus){
                  $state.go('re-isu', null, { reload: 're-isu' });
              }
              else{
                  $uibModal.open({
                      templateUrl: 'app/entities/re-isu/re-isu-validate-dialog.html',
                      controller: 'ReIsuValidateController',
                      controllerAs: 'vm',
                      backdrop: 'static',
                      size: 'lg',
                      resolve: {
                          reIsusToValidate: function() {
                              var tabIds = [];
                              $stateParams.reIsus.forEach(function(ri) {
                                  if (ri.selected === true) {
                                      tabIds.push(ri);
                                  }
                              });
                              return tabIds;
                          }
                      }
                  }).result.then(function() {
                      $state.go('re-isu', null, { reload: 're-isu' });
                  }, function() {
                      $state.go('^');
                  });
              }
          }]
      })
  </code></pre>
  
  <p>My main view with the button to open the modal:</p>
  
  <pre><code>                                &lt;tr ng-repeat="reIsu in vm.reIsus track by reIsu.id"&gt;&lt;td&gt;&lt;button type="submit" ng-click="vm.unitaryValidation(reIsu)"
                                  class="btn btn-primary btn-sm"&gt;
                              &lt;span class="glyphicon glyphicon-ok"&gt;&lt;/span&gt;
                              &lt;span class="hidden-xs hidden-sm" data-translate="entity.action.validate"&gt;&lt;/span&gt;
                          &lt;/button&gt;
  </code></pre>