My ngFor doesn't work even though it was a copy of a code from the same project


#1

HI,there
i switched from ionic 1 to ionic 2 i wanted to run a ionic 2 list dispaly where i used remade sidemenu template to start with
then i created a new page using CLI by name home every thing worked fine but when i started using displaying of list of data from the home.ts i get a blank page in home.html
here is my
home.ts

import { Component } from “@angular/core”;
import { NavController, NavParams } from ‘ionic-angular’;

@Component({
templateUrl: ‘build/pages/home/home.html’
})
export class HomePage {
selectedItem: any;
icons: string[];
items: Array<{title: string, note: string, icon: string}>;

constructor(private nav: NavController, navParams: NavParams) {
// If we navigated to this page, we will have an item available as a nav param
this.selectedItem = navParams.get(‘item’);

// Let's populate this page with some filler content for funzies
this.icons = ['flask', 'wifi', 'beer', 'football', 'basketball', 'paper-plane',
'american-football', 'boat', 'bluetooth', 'build'];

this.items = [];
for(let i = 1; i < 11; i++) {
  this.items.push({
    title: 'Item ' + i,
    note: 'This is item #' + i,
    icon: this.icons[Math.floor(Math.random() * this.icons.length)]
  });
}

}

itemTapped(event, item) {
// That’s right, we’re pushing to ourselves!
this.nav.push(Page2, {
item: item
});
}
}

and this is my home.html

<ion-navbar *navbar>



Home

{{item.title}}
{{item.note}}
You navigated here from {{selectedItem.title}}

#2

The only “ngFor” I see is in the topic title.