Good day! There is a JSON data file. Trying to get data from a JSON file, the error console gives:
Error: undefined is not an object (evaluating '$ http.get')
JSON example:
{ "variantA": { "sumInsuredThirty": [ { "DAYFROM": 1, "DAYTO": 3, "TARIF": 2 }, { "DAYFROM": 4, "DAYTO": 5, "TARIF": 2 }, { "DAYFROM": 6, "DAYTO": 8, "TARIF": 4 } } This is how I get data from JSON:
$http.get('/JSON/rates.json').success(function(data) { $scope.rates = data; }); Tell me, what is the error? JSON file validation passes. Thank you in advance!
Error: undefined is not an object (evaluating '$http.get')- user236014