Using Angular, Ionic and UI-Router, I am trying to change states and pass data to State Params. With Angular built into Ng-Route, it was easy, but just created the link that way.
<a href="state2/{{detail.id}}">Brings me to state 2 with detail about this item</a>
But as Ionic switched to UI-Router, this tends to disrupt the created transitions. I saw a demo where in people controllers there is a click handler that sets a state change:
$scope.switchState = function(){
$state.go('abstract.main');
<a ng-click="switchState">Change States</a>
This works if the nested state is only a static representation. But I want to know how to properly change states and go through the parameters to get the data. Any ideas?
source
share