2016-08-13 18 views
1

が表示され角度2 * ngFor問題

<ion-list> 
    <button ion-item menuClose *ngFor="let p of pages" (click)="openPage(p)"> 
    <ion-icon item-left [name]="p.icon"></ion-icon> 
    {{ p.title | translate }} 
    </button> 
</ion-list> 

、初期化されますコンポーネント内のそのようなコードによって:

pages: PageObj[] = [ 
{ title: "dashboard.Title", component: DashboardPage, icon: "calendar" }, 
{ title: "transactions.Title", component: TransactionsPage, icon: "cash" }, 
{ title: "categories.Title", component: CategoriesPage, icon: "pricetags" }, 
{ title: "budgets.Title", component: BudgetsPage, icon: "briefcase" }, 
{ title: "personal.Title", component: PersonalPage, icon: "ios-person" } 
// { title: "cards.Title", component: CardsPage, icon: "ios-person" } 

]

PageObjのインターフェイスもあります。であることをこの程度 奇妙なこと:それはRC.3

  • 同じコードで働いていた

    1. はイオン会議アプリケーションの例で働いています。
  • +0

    [this one](https://plnkr.co/edit/vKgkOF?p=info)のように、このコードを追加してテストすることができますか? Angular RC4と一緒に最新のIonic 2 beta.11バージョンを使用しています – sebaferreras

    答えて

    0

    私は最新の例私のプロジェクトではとイオン会議アプリのコードとLIBSを比較すると、私は

    "@angular/common": "2.0.0-rc.5", 
    "@angular/forms": "0.3.0" 
    

    "@angular/common": "2.0.0-rc.4", 
    "@angular/forms": "0.2.0" 
    

    すべてでそれを交換した後を使用していたことが判明