嘗試去通過這些討論,可能是它可以幫助你 https://github.com/angular-ui/ui-router/issues/1758,https://github.com/angular-ui/ui-router/issues/64
此外,由於它,如果你在使用NG-href的工作正常側面的菜單圖選項,所以不要使用ng-click使用ui-href並調用返回狀態名的函數。像這樣的東西;
<ion-item ng-repeat="feature in features | filter: {attributes: {Property: search.input}} as filteredCount"
class="item item-icon-left item-icon-right"
ui-sref={{onListItemClick({"Station_Id":487,"Property":"Neal Blaisdell Center Parking Structure","Street_Address":"777 Ward Avenue","City":"Honolulu","Zip_Code":96814,"Island":"Oahu","In_Use":"No","Charger_Fee_Type":"Free","Charger_Notes":"Enter S. King Street/Victoria street. Follow blue signs to Charger.","Hours_of_Operation":"6:00am-12:00am","Charger_Count":1,"Charger_Port":1,"Charger_Level":2,"Charger_Fee":"Free","Parking_Fee":"Free for EV Drivers","Network":"ChargePoint","Notes":"Activate charger with ChargePoint Network card or call the number listed on the front of the charger for access. ","Latitude":21.299434,"Longitude":-157.850378,"Location":"(21.299434, -157.850378)","Other1":null,"Other2":null,"Other3":null,"Other4":null,"Other5":null,"Other6":null,"Other7":null,"Other8":null,"Other9":null,"Other10":null,"FID":3,"CreationDate":1484871379520,"Creator":"dpascual_HEC","EditDate":1484871379520,"Editor":"dpascual_HEC","Hawaiian_Station":null,"OwnedBy":null,"ChargingStandards":null,"Servicing":null,"ServiceNotes":null}) }}>
</ion-item>
Controller.js
$scope.onListItemClick = function (attributes) {
var data = {
properties: attributes
};
return "app.detail({attributes:"+data+"})" ;
}
我希望這能解決你的問題。