0
如上面標題中所述,我在路由時遇到困難。當頁面重新加載時,Angular 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 ''
。
我很困惑,爲什麼這是,謝謝提前。