且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

angular.js - AngularJS ng-show 值已经是true了,但是还显示ng-hide

更新时间:2022-10-28 15:22:58

$scope.RealTimeUpdate = function (obj) {
    var thisRurl = '/MFreeXFapi/student/RealTimeUpdate';
    var rturl = $(obj).attr('rthref');
    $http({
        method: 'POST',
        url: thisRurl,
        transformRequest: $.param,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded;' },
        data: 'ProductId=' + $rootScope.paycourseId + '&studentid=' + $scope.userData.rowId + '&orderid=' + $scope.payood,
    }).success(function (data) {
        if (data != true) {
            $scope.orderError = true;
            console.log($scope.orderError)

        } else {
            window.location.href = rturl
        }
    })
};


jq的ajax不会触发ng的检查机制 需要使用$http代替 或者改变model后使用$scope.$apply

http://***.com/ques...