【发布时间】:2018-03-26 04:01:05
【问题描述】:
大家好,在我使用 $state.go 更改状态后,我正试图达到新的范围。
$state.go("newState").then(function () {
// doesn't work
$state.current.$scope.variable = "abc";
// doesn't work as well because it's referencing the old $scope
$scope.variable = "def";
})
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
【问题讨论】:
标签: angularjs promise angular-ui-router