Hello,
I have angularJS code like this:
$scope.GetCities = function () {
//alert("yuyu");
var RouteNo = $scope.StoppageMaster.RouteNo;
if (RouteNo) {
$http({
method: 'POST',
url: '/Stoppage/GetCities/',
data: JSON.stringify({ RouteNo: RouteNo })
}).success(function (data, status, headers, config) {
$scope.Source1 = JSON.stringify(data);
alert($scope.Source1);
}).error(function (data, status, headers, config) {
$scope.message = 'Unexpected Error';
});
}
else {
$scope.states = null;
}
}
Output:
[{"Source":"Kanpur","Destination":"Lucknow"}]
I need value of source. Please help.

Ankit ShuklaPosted Aug 9, 2017, 3:27 AM
Puneet KankarPosted Aug 9, 2017, 2:49 AM
Ankit ShuklaPosted Aug 9, 2017, 2:04 AM
Manas MohapatraPosted Aug 9, 2017, 1:56 AM
Puneet KankarPosted Aug 9, 2017, 1:17 AM
Ankit ShuklaPosted Aug 9, 2017, 12:22 AM
Puneet KankarPosted Aug 8, 2017, 9:11 AM