title: state parameter value is mixed with url in UI-Router in angularjs when refresh is clicked
body: <p>I am trying to creating web page to perform on edit actions in both in parent(first.edit) and child(second.edit) states. 
  I sending related state parameters through URL, those are captured by using regex patterns.</p>
  
  <p>When I click on  ui-sref="<strong>home.first.edit({firstId:10})</strong>" link the controller receiving state parameter <strong>firstId</strong> correctly i.e <strong>10</strong>.</p>
  
  <p>When I click on ui-sref="<strong>home.first.second.edit({firstId:10,secondId:20}</strong>)" link or refresh the the state the controller receiving in correct value for <strong>firstId</strong> i.e <strong>10/second/20</strong>.
  and it is moving to <strong>parent state(home.first)</strong></p>
  
  <p>This is my js file</p>
  
  <pre><code>angular.module('MyApp', [
    'ui.router'
  ])
    .config(function($stateProvider, $urlRouterProvider) {
  
     $urlRouterProvider.otherwise('/home');
  </code></pre>
  
  <p>Here are the <code>states</code>:</p>
  
  <pre><code>$stateProvider.state('home', {
    url: '',
    views: {
      'home_view': {
        templateUrl: 'index.html',
        controller: 'homeController'
      }
    }
  })
  .state('home.first', {
    url: "/first",
     params:{
      firstId:null
      },
    views: {
      'home_view': {
        templateUrl: "first.html",
        controller: 'firstCtrl'
      }
    }
  })
  .state('home.first.edit', {
        url: "/{firstId:[0-9]+}/edit",
        views: {
          'first_view': {
            templateUrl: "/edit_first.html",
            controller: 'firstCtrl'
          }
        }
      })
  .state('home.first.second', {
      url: "/second",
      params:{
      secondId:null
      }
      views: {
        'first_view': {
          templateUrl: "/second.html",
          controller: 'secondCtrl'
        }
  
      }
    })
  .state('home.first.second.edit', {
      url: "/{secondId:[0-9]+}/edit",
      views: {
        'second_view': {
          templateUrl: "/views/testplan/projects/edit_second.html",
          controller: 'secondCtrl'
        }
      }
    })
  </code></pre>
  
  <p>Here is the rest of the code with <code>controller</code> definition</p>
  
  <pre><code>  .controller(
      'homeController',
      function($scope, $state, $stateParams) {
        //  console.log($stateParams.firstId);
      }
    )
    .controller(
      'firstCtrl',
      function($scope, $state, $stateParams) {
        console.log($stateParams.firstId);
      }
    )
    .controller(
      'secondCtrl',
      function($scope, $state, $stateParams) {
        console.log($stateParams.secondId);
      }
    );
  </code></pre>