I've found no way of solving this.
I have a jQuery ajax call that has always worked. I'm creating a new app with Angularjs (I'm new) and my new, Angularjs, ajax worked perfectly. When I test published to azure I found the code no longer worked. It gives an error of 0. I kid you not. I put the code in plunker and got the same result.
I have read and tried a bunch of things. I even tried using the jQuery ajax to populate the angularjs $scope.myData . By the way it populates it correctly, however Angular doesn't seem to be aware that it has new data?
Any help would be great. Thanks in advance. ;-)
I don't actually need the App Key since i setup azure to accept get requests from anyone, but in trying a bunch of stuff...
// Angular version:
$http({ method: 'GET', url: fullUrl, headers: { 'X-ZUMO-APPLICATION': AppKEY, 'Content-Type': 'Application/json' } })
.success(function (data, status) {
// Success
angular.copy(data, $scope.data);
})
.error(function (data, status) {
// Error
alert(status);
});
And here is the jQuery:
$.ajax({
url: startOfUrl + "recetas",
headers: {
"x-zumo-application": AppKEY
},
dataType: 'json',
success: function (data) {
// My work
},
error: function (x, status, Err) {
alert(status);
},
complete: function () {
}