title: Passing UI-Router state params from parent to child consistently
body: <p>I have the following UI-Router state definitions (trimmed down to only applicable aspects for brevity):</p>
  
  <pre><code> .state('ep.perma', {
      url: '/:permalink',
      params: {permalink: ''}, //default
      templateUrl: 'views/conference/home.html',
      controller: 'HomeCtrl'
    })
  
    .state('ep.perma.login', {
      url:'/login',
      templateUrl: 'views/dialogs/login.html',
      controller: 'LoginCtrl',
    })
  
    .state('ep.perma.register', {
      url: '/register',
      templateUrl: 'views/dialogs/register.html',
      controller: 'RegisterCtrl'
    })
  </code></pre>
  
  <p>The :permalink parameter in the parent ep.perma state could be anything, but let's say it's 'acb123'. The login and register states each have an sref link to toggle to the others state in their html. Everything works fine if you go to the parent ep.perma state as the url initally. You can switch between login and register all day long and the :permalink parameter is persisted.</p>
  
  <p>However if you navigate to the login or register state via a URL .../acb123/login or .../abc123/register initially everything is OK. But then if you then try to switch from login to register or the other way around by (depending on which URL you went to 1st) clicking the SREF link in the html, the :permalink param reference is lost. So, it I am at .../abc123/login, the sref for register in logins html should be .../abc123/register, but is //register instead. It's there on the initial load for either URL, but not in that html sref to go directly to the other.</p>
  
  <p>This only happens if going to either the login or register child state directly via URL. If I go tot the parent ep.perma URL .../abc123 initially everything is fine.</p>
  
  <p>Any thoughts on why this happens and/or how to address this? I found digging around here before posting this that I can pass the param(s) via resolves from the parent then consume them in the children, but do not want to end up with .../abc123/abc123/login if not accessing directly via the url. I am also not 100% clear on how to set them in the child state (only the controller per the example <a href="https://github.com/angular-ui/ui-router/wiki/URL-Routing#important-stateparams-gotcha" rel="nofollow">here</a> </p>
  
  <p>I need for users to be able to got to either login or register via direct URL and switch between them having the initial specified :permalink parameter persist like it does if going directly to the parent as the initial URL.</p>
  
  <p>TIA </p>