title: AngularJs UI-Router - Page Refresh $state.current is now empty
body: <p>I have an <code>Angular</code> application using <code>ui-router</code> and I am having issues whenever I refresh the page. I am using nested views, named views to build the application. Whenever I refresh the page, <code>ui-router</code> doesn't reload the current state and just leaves the page blank. </p>
  
  <p>On page load <code>$state.current</code> is equal to</p>
  
  <pre><code>Object {name: "", url: "^", views: null, abstract: true}
  </code></pre>
  
  <p>I am reading my navigation from a <code>.json</code> file via <code>$http</code> and looping through the states. So this is what I can show:</p>
  
  <pre><code>stateProvider.state(navElement.stateName, {
      url: navElement.regexUrl ? navElement.regexUrl : url,
      searchPage: navElement.searchPage,   //something custom i added
      parent: navElement.parent ? navElement.parent : "",
      redirectTo: navElement.redirectTo,
      views: {
          'subNav@index': {
              templateUrl: defaults.secondaryNavigation,
              controller: 'secondaryNavigationController as ctrl' //static
          },
          'pageContent@index': {
              template: navElement.templateUrl == null 
                                                ? '&lt;div class="emptyContent"&gt;&lt;/div&gt;' 
                                                : undefined,
              templateUrl: navElement.templateUrl == null 
                                                ? undefined 
                                                : navElement.templateUrl,
              controller: navElement.controller == null 
                                                ? undefined 
                                                : navElement.controller + ' as ctrl'
          }
      }
  });
  </code></pre>
  
  <p>This code gets executed for each item in the nested json object. If there is anything else that would be helpful, let me know.</p>