I am having difficulty getting $http
service to work with my AngularJS application. I am developing it in Visual Studio 2012, using IISExpress. I have the following code:
var myApp = angular.module('myApp', []);
myApp.controller('MyController', ['$scope', '$http', function($scope,$http) {
$http.get('js/data.json').success(function(data) {
$scope.artists = data;
});
}]);
"success" is never fired. How do I get $http
to work?