html
<!--数组:var routes = [{route:'go-update-a',id:1},{route:'go-update-b',id:2}];-->
<a ng-click="vm.changeRoute(item)">改变跳转路径</a>
<a ui-sref="{{item.route}}({id: item.id})">去修改</a>
<!--vm.changeRoute()方法调用成功-->
<!--html里面(params改变成功)(state未改变成功,一直是go-update-a)
<a ui-sref="{{item.route}}({id: item.id})" href="go-update-a?id=1">去修改</a>
<a ui-sref="{{item.route}}({id: item.id})" href="go-update-a?id=2">去修改</a>-->
<a ui-state="item.route" ui-state-params="{id: item.id}">去修改</a>
<!--用ui-state改变state,ui-state-params改变params-->
解决方案:
angular ui - Dynamically set the value of ui-sref Angularjs - Stack Overflow