I get an error 400 when i try to retrieve the JSON from this URL below with $http.get.
$http.get('https://api.spotify.com/v1/search?q=artist:Owl+City+title:On+The+Wing&type=track&limit=1').
success(function(data) {
console.log("Success");
})
.error(function(error, status, headers, config) {
console.log(status);
console.log("Error occured");
});
I manage to retrieve it with this :
$.getJSON('https://api.spotify.com/v1/search?q=artist:Owl+City+title:On+The+Wing&type=track&limit=1').then(function (data) { console.log("Success");});
But the problem is that when i try to change a value in my $scope with this method, it 's only displayed in the view, one action after, because of that i get the previous song infos and not the current one.
Thank you for your anwser.
