I created a json file under json folder json/caseNames.json and trying to read that file in a controller. Here is my code. When I debug this code it is not going to the next statement after $http.get line. How do I read the file? Does it have any syntax errors?
app.controller('CaseNamesController',function($http,$scope){
$scope.names = [];
$http.get('/json/caseNames.json')
.success(function(response){
console.log(response);
$scope.names = response;
})
.error(function(response){
$scope.names =[];
});
});