I ask for your help for a problem that I encounter with IONIC 1. When I change the API level from 30 to 31 in the config.xml file:
this code is not working
$http.get($scope.url)
.then(function (success) {
...
}, function (error) {
$scope.errTXT = JSON.stringify(error);
});
returns a status of 0.
{ "data": null, "status": 0, "config": { "method": "GET", "transformRequest": [ null ], "transformResponse": [ null ], "url": "https://xxxxxxxxxxxxxxxxxx", headers: { "Accept": "application/json, text/plain, /" } }, "statusText": "" }
I don't understand why the result of http is null
Just for information, when i change back to API 30, everything is working well. I do not think is a server problem. I start thinking that the $http.get is not supported in API 31? My server is running on HTTPS://.......
Ionic CLI : 5.4.16 (C:xxxxxxxx\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic1 1.3.1
@ionic/v1-toolkit : not installed
Cordova:
Cordova CLI : 11.0.0
Cordova Platforms : android 9.1.0
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 16 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
Android SDK Tools : 26.1.1 (xxxxxxxx
\AppData\Local\Android\Sdk\)
NodeJS : v14.16.1 (C:\Program Files\nodejs\node.exe)
npm : 7.24.2
OS : Windows 10
Did you remove the "android" folder and add it again?