*Hey Guys, Hope you will be fine. Actually, I am facing an error with Ionic and woocommerce. I want to display my woocommerce course into my ionic app. I have a data in variable. But, When I use ngFor, I get an error given below:
It looks like you are trying to loop over right as if it were an array, but instead it is an object.
If the result from getPosts() will always be a single object you should get rid of the *ngFor= logic and just reference the object directly in the template <h1>{{ this.right.title.rendered }}</h1>.
If the response from getPosts() can be an array or a single object, you should be able to add a check in your getPosts method…something like this should work this.right = data.length ? data : [data].
But IF you have access to the api code that is returning the response for the getPosts method, you should always return an array whether the result set contains 1 record or 100 records