One of two identical buttons throws No provider for NavController!


#1

I have two buttons on page:

account.html:

<button block ion-button color="default" icon-right (click)="editAccount()">
  Edit
  <ion-icon name="compose"></ion-icon>
</button>
<button block ion-button color="default" icon-right (click)="addProduct()">
  Add Product
  <ion-icon name="plus-round"></ion-icon>
</button>

account.ts:

export class AccountPage {
  ...
  editAccount () {
    this.navCtrl.push ( Reg );
  }

  addProduct () {
    this.navCtrl.push ( AddProductPage );
  }

AddProductPage

When I click AddProduct I get:

EXCEPTION: Error in ./AccountPage class AccountPage - inline template:37:4 caused by: No provider for NavController!

I cannot understand what wrong?


#2

Error was in second component