对于html
<button ng-click="clicked();" class="btn btn-sm btn-success" id="itemSelection"
ui-sref="resourceDefault.clicked({name:item.name,energyId:item.energyId, energyChain:item.energyChain,resourceId:item.resourceId,facilityId:item.facilityId})">
{{item.name}}
</button>
我的控制器工作正常
resourcesApp.controller('detailsController', ['$scope', '$stateParams', function ($scope, $stateParams) {
$scope.label = $stateParams.name;
$scope.show = true;
$scope.clicked = function ($stateParams) {
$scope.show = !show
$scope.label = $stateParams.name;
return ;
};
请你帮忙,我想在点击时改变$ scope.label的价值