I have a input file which i can see in my jsp file and it renders the json object. I want to call this inside my JS file in the Angular controller.
The input file in JSP is.
<input type="hidden" value=${getGlobalFeaturesList}
ng-model="featureslistJson" id="getglobalfeaturelist">
In the controller i am calling
$scope.myData = ($scope.featureslistJson.ReadFeaturesResponse.feature);
Before this i was using external JSON FILE WHICH WORKS FINE
This call works fine
$http.get("script/data.json").success(function (response) {
$scope.myData = (response.ReadFeaturesResponse.feature);
});
How I do the same with the featureslistJson
I get error cant read ReadFeaturesResponse.
Any help will be good.