I am trying get data from a simple api, it works fine in ionic serve(browser) , But when i build the app http call does not work. my Code is
this.http.get("http://example.com/api/routes").subscribe(response => {
this.routes = response["routes"];
for (let x in this.routes) {
let a = this.routes[x].rou_stops;
let b = a.split(",");
for (let y in b) {
this.newCit.push(b[y]);
}
}
});
please help with this issue.