'dkStudnet.do?method=JsonData&Student='+ encodeURIComponent(angular.toJson($scope.myData))
Angular.to JSON not allowing % as parameter
-
06-10-2022 - |
سؤال
I am trying to send some Angular object through JSON.
I tried this.
$scope.dkPrintData=function(){
$scope.myData={name:'Ramesh',class:'XII',Marks:'90%'};
$http.get('dkStudnet.do?method=JsonData&Student='+ angular.toJson($scope.myData))
.success(function(data, status, headers, config) {
});
If I removed %
symbol in the $scope.MyData
object it is working fine but it is not accepting special charters like %
.
المحلول
لا تنتمي إلى StackOverflow