angularjs - Replace state on Ionic link click -
i'm using ionic , have template code this:
<ion-item ng-repeat="model in models" href="#/app/ctrl/{{model.id}}"> {{model.name}} </ion-item>
when click link, state changed view. fine.
but how replace current view new 1 without keeping on history?
i have following code, works in controller:
$ionichistory.currentview($ionichistory.backview()); $state.go('app.products', {location: 'replace'});
but don't know how achive same clicking on link.
according this docs site can try this:
<ion-item ng-repeat="model in models" ui-sref="name.of.state" ui-sref-opts="{location: 'replace'}"> {{model.name}} </ion-item>
Comments
Post a Comment