【发布时间】:2013-10-14 13:42:55
【问题描述】:
如何使用 ng-click 而不是应用 ui-sref 的链接来更改 route.state。
我试过了:
<button ng-click="selectDir(file.fullPath)">set</button>
与
$scope.selectDir = function(location) {
options.storageLocation = location;
$route.current = 'recorder.options';
}
但它不起作用。有什么想法吗?
【问题讨论】:
-
ui-sref 看到这个答案:stackoverflow.com/a/21105057/2539811
标签: angularjs angular-ui angular-ui-router