div class ="col-lg-5 stylethistitle">
<input type=" checkbox" ng-model = "checkedStatus">Show Deactivated Account</div>
我需要在我的 json 请求中将 $scope.checkedStatus 在被选中时作为 false 传递,在未选中时传递 true 。
我需要它来显示已停用的帐户。
在下面包括了我的 JS
JS:
$scope.checkedStatus = true;
$scope.viewAccount = function(){
var json = {
"json": {
"request": {
"servicetype": "6",
"functiontype": "6014",
"session_id": $rootScope.currentSession,
"data": {
"shortname": $scope.model.selectShortName,
"groupzname": $scope.model.selectGname,
"city": $scope.model.selectCity,
"state": $scope.model.selectState,
"country": $scope.model.selectCountry,
"groupzcode": $scope.model.selectGcode,
"activationstatus": $scope.checkedStatus,
"details": false,
"sortbasedon": $scope.groupzname,
"offset":$scope.pagination
}
}
}
};
$scope.sortkey='';
$scope.reverse=false;
UserService.viewListAccount(json).then(function(response) {
if (response.json.response.statuscode == 0 && response.json.response.statusmessage == 'Success')
{
$scope.tableData = response.json.response.data;
}
});
};