Hi, I am a beginner in both Ionic and APIs. Currently, I have an API where I need to get data and display it on my app. I tried to display the data using the *ngFor but it doesn’t work. Will anyone please guide me on this?
I am getting ERROR TypeError: Cannot read property 'length' of undefined and ERROR TypeError: Cannot read property 'records' of undefined. Console log is not displaying anything
This is because that dedi array is not loaded as subscribing is take place in same function. will you wrap my above loop code put inside of your subscribe or use setTimeOut to delay my loop execution.
Also make sure that you have changed this dedid to dedi
I am in office otherwise i would able to resolve your problem via teamviewer or anyDesk
I see, I have changed it already. Actually, I have modified my codes. I have made the amendments to the post and included your codes into the amendment as well. Please take a look and tell me if I am doing anything wrongly. Currently, it is throwing this error only ERROR TypeError: Cannot read property 'records' of undefined. Thanks a lot for your help btw!
Hey you did not return the response.json() from the http call
If you are failed to resolve this issue before 9PM IST i will try to do via teamviewer or AnyDesk.
No, don’t. This post makes zero sense. You are mixing old deprecated Http with more modern HttpClient syntax. Http does not have templated get, and HttpClient wants neither Response nonsense or calling json().
i have passed so many arguments with http.get sometime i pass id to get the user post. actually i didnt get the what kind of data will have dediresult Anyway he is already resolved the issue.