2017-02-02 7 views
0

タイトルに上記のとおり、私はルーティングに問題があります。ページがリロードされたときに角度UIルータが状態を解決できない

私のルートは動作しますが、ページがリロードされたときには表示されません。

経路は、オブジェクト:ルートに

{ 
    state: 'locations', 
    config: { 
     parent: 'root', 
     url: '/locations', 
     abstract: true, 
     template: 
     '<!-- // LOCATIONS START // -->' + 
     '<div data-ui-view></div>' + 
     '<!-- // LOCATIONS END // -->' 
    } 
    }, 
    { 
    state: 'locations.manageLocation', 
    config: { 
     url: '/manage/customer-details', 
     templateUrl: 'platform/app/locations/locations.manage-location.html', 
     controller: 'LocationsManageController', 
     controllerAs: 'vm', 
     title: 'Locations - Loading', 
     params: { 
     id: null 
     }, 
     requires: { 
     login: true, 
     params: { 
     storage: { 
      id: 'campaignId' 
     }, 
     values: ['id'] 
     } 
    } 
    } 

リンク:

<a data-ui-sref="locations.manageLocation({ id: customer.id })" class="button" href="#/locations/manage/customer-details">Manage Locations</a> 

コンソールに記録実際のエラーがある: Could not resolve 'undefined' from state ''

私はこれがなぜなのか、混乱しています。事前に感謝します。

答えて

0

まあ私は気が気にならない、私はlocalStorageにcustomer.idを設定するのを忘れていたので、ルートはIDなしでリロードでは動作しませんでした。

関連する問題