I'm stuck in creating my first Ionic app.
Created a simple REST-API with Golang. It's working fine when i make the GET call in browser and / or Postman. The Output is:
[
{
"id": 1,
"name": "Leanne Graham"
},
{
"id": 100,
"name": "I COME FROM YOUR OWN REST-API!!!"
}
]
I created a simple Ionic 3 (with Angular 5) web app based on some tutorials. I just wanted to diplay my test data in an ionic-list with ngFor. This is working fine with some static (hard-coded) data.
http://jsonplaceholder.typicode.com/users
. This also worked fine; I was able to display the users' data (tried only with id
and name
) in my ionic-list.http://jsonplaceholder.typicode.com/users
. See above.My ionic-list stays empty after fetching data from my own REST-API but works with any other public API.
http://jsonplaceholder.typicode.com/users
i guess there is something wrong in my api-response headers. No tutorial covers the header stuff. This is why I didn't set them. I tried different headers in my response like w.Header().Set("content-type", "application/json")
but this doesn't help.