I am attempting to retrieve data from a JSON file using AngularJS and the $http.get
method. I am following the new way of writing AngularJS scripts, as outlined in this helpful link.
However, when I try to execute my code, nothing appears to be happening and Firebug is not providing any useful information.
I suspect that the issue lies within my activate()
function, particularly with regards to my understanding of promises.
function activate() {
return $http.get('test.json').then(function(data) {
vm.result = data;
return vm.result;
});
}
Do you have any insights or suggestions on how to resolve this issue?