title: angular UI router | $stateParams not working
body: <p>seems like <code>$stateParams</code> is not working.
  passing date like this:</p>
  
  <pre><code>$state.go('state2', { someParam : 'broken magic' });
  </code></pre>
  
  <p>params being ignored on the target state</p>
  
  <pre><code>console.log('state2 params:', $stateParams); // return empty object {}
  </code></pre>
  
  <p><strong>code:</strong></p>
  
  <pre><code>    var app = angular.module('app', [
       'ui.router'
      ]);
  
      app.config(function($stateProvider) {
        $stateProvider
              .state('state1', {
                  url: '',
                  templateUrl: 'state-1.html',
                  controller : function ($scope, $state, $stateParams) {
                    $scope.go = function () {
                      $state.go('state2', { someParam : 'broken magic' });
                    };
  
                    console.log('state1 params:', $stateParams);
                  }
              })
              .state('state2', {
                  url: 'state2',
                  templateUrl: 'state-2.html',
                  controller : function ($scope, $state, $stateParams) {
                    $scope.go = function () {
                      $state.go('state1', { someOtherParam : 'lazy lizard' });
                    };
  
                    console.log('state2 params:', $stateParams);
                  }
              });
      });
  </code></pre>
  
  <p><strong>Live example can be found <a href="http://jsbin.com/weger/5/edit" rel="nofollow noreferrer">here</a></strong></p>
  
  <p>thank you.</p>