Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Remote url not working but local url working for http ionic3

$
0
0

@developerrky wrote:

Hi All,
home.ts
public getFuelCities() {
let URL = "assets/data/locations.json";
// let URL = "http://fuelpriceindia.herokuapp.com/cities.json"

this._http.get(URL)
.map(res => res.json())
.subscribe(data => {
this.fuelcities = data.cities;
console.log(JSON.stringify(data.cities));
});
}

home.html

Choose City

{{cityName}}

The dropdown has its data when I call json locally using let URL = "assets/data/locations.json";
But it doesn't work when I call the same data from external url
let URL = "http://fuelpriceindia.herokuapp.com/cities.json"

I tried settting this url in proxy too:

"proxies": [
{
"path": "/api",
"proxyUrl": "http://fuelpriceindia.herokuapp.com"
}
]

But nothing happend, could you please assist me on this. this is urgent for me.

Regards,
Rajesh

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>