The Movie Database

Hey all,

i have one Problem. I want to get Movie Information from The Movie Database Api

with this provider I want to get Data:

  getData() {
    return new Promise(resolve => {
        .subscribe(data => {
        }, err => {

in my home.ts the code looks like:

  ionViewDidLoad() {
      .then((response) => {
        if (response) {
          this.movieData = response;
this.movieData  = any;

So if I want to loop in home.html with ngFor I get this Error:

Cannot find a differ supporting object ‘[object Object]’ of type ‘object’. NgFor only supports binding to Iterables such as Arrays.

Okay that means ngFor can only work with Arrays, but how can I do my JSON Data from API to Array? Please Help

Try changing movieData to array before you get the data.

this.movieData = [];

Or just declare it as an array

public movieData: any = [];