在http成功调用上启用锚标记无效

Enable of anchor tag on http success call not working

本文关键字:无效 启用 http 成功 调用      更新时间:2023-09-26

这是我的Html页面

<a href="javascript:void(0)" a-disabled="disablestart || disablestop || disabledeploy || disableundeploy || disabledelete || disablerefresh" id="start-{{$index}}" ng-click="start(app_list.appId,$index)" class="start"><i class="fa fa-play fa-lg"></i>Started</a> 
                                                    <a href="javascript:void(0)"  a-disabled="disablestart || disablestop || disabledeploy || disableundeploy || disabledelete || disablerefresh" id="stop-{{$index}}" ng-click="stop(app_list.appId,$index)" class="stop"><i class="fa fa-stop fa-lg"></i> Stop</a>
                                                    <a href="javascript:void(0)"  a-disabled="disablestart || disablestop || disabledeploy || disableundeploy || disabledelete || disablerefresh" id="refresh-{{$index}}" ng-click="refresh(app_list.appId,$index)" class="refresh"><i class="fa fa-refresh fa-lg"></i>Refresh</a>
                                                    <a href="javascript:void(0)"  a-disabled="disablestart || disablestop || disabledeploy || disableundeploy || disabledelete || disablerefresh" id="deploy-{{$index}}" data-toggle="modal" data-target="#upload-{{$index + 1}}myModal" class="deploy"><i class="fa fa-cloud-upload fa-lg"></i> Deploy</a> 
                                                    <a href="javascript:void(0)"  a-disabled="disablestart || disablestop || disabledeploy || disableundeploy || disabledelete || disablerefresh" id="undeploy-{{$index}}" ng-click="undeploy(app_list.appId,$index)" class="undeploy"><i class="fa fa-dot-circle-o fa-lg"></i>Undeploy</a>
                                                    <a href="javascript:void(0)"  a-disabled="disablestart || disablestop || disabledeploy || disableundeploy || disabledelete || disablerefresh" id="delete-{{$index}}" data-toggle="modal" data-target="#delete-{{$index + 1}}myModal" class="delete"><i class="fa fa-trash-o fa-lg"></i> Delete</a>

这是我的控制器

$scope.start = function(appStartId,index){
        $scope.disablestart = true;
        var modalStartIndex = index+1;
        usSpinnerService.spin('spinner-1'+index);
        appService.startApp(appStartId).success(function(data, status) {
            $scope.disablestop = false;
            $scope.disablestart = false;
            usSpinnerService.stop('spinner-1'+index);
            console.log("Started the application "+status);
            console.log(data);
            $scope.startSuccess(data.name,data.status);
            console.log(data.status.toLowerCase());
            $filter('filter')($scope.AllApplicationList, {name: data.name})[0].status = data.status.toLowerCase();
        }).error(function(data,status){
            usSpinnerService.stop('spinner-1'+index);
            console.log(data);
            console.log(status);
            if(status == 0){
                $scope.networkError();
            }else{
                $scope.startFail(data);
            }
        })
    };

锚标记被正确禁用,但在http调用成功时没有启用。请告诉我哪里做错了。请帮助我

成功或错误

$scope.disablestop = false;
$scope.disablestart = false;
$scope.disabledeploy = false;
$scope.disableundeploy = false;
$scope.disabledelete = false;
$scope.disablerefresh = false;