@Jl1 wrote:
Hi,
I have a working backend online. I can access it on my device.
In development mode, I use a proxy to avoid CORS.
When I run "ionic run", I remove it.
This part of code:var checkInternetConnection = function () {
$ionicPlatform.ready(function () {
if (window.Connection) {
if (navigator.connection.type == Connection.NONE) {
$ionicPopup.alert({
title: "Internet Disconnected",
template: "The internet is disconnected on your device."
});
}
}
$http.get("http://example.com/").error(function (errors) {
$ionicPopup.alert({
title: "Connection error",
template: errors
});
});
});
};(sorry for the bad indentation)
Doesn't give me the "Internet Disconnected" popup, but the "Connection error" one with, as a template, nothing... (this was for debugging, but "nothing" doesn't help me)
Is it a CORS problem? I have read CORS doesn't appear when using "ionic run" without live reload.
It's not a connection error.Well, I don't know, please can someone help me?
PS: I'm running on android 5.0.1, the last one I suppose..
Posts: 2
Participants: 2