I have this error when reloading my Ionic App with -ionic serve :
Error: Can not resolve all parameters for EditPage: ([object Object], [object Object], [object Object],?).
This is the EditPage typescript ( edit.ts ):
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { HomePage } from "../home/home";
import { IconsPage } from '../icons/icons';
@Component ({
selector: 'page-edit',
templateUrl: 'edit.html'
})
export class EditPage {
position: number;
notification = this.homePage.allNotifications[this.position];
newDoneText: string = 'Hecho';
newCancelText: string = 'Cancelar';
constructor(public navCtrl: NavController,
public iconsPage: IconsPage,
public navParams: NavParams,
public homePage: HomePage,
) {
this.position = navParams.get('position');
}
openIcons() {
this.navCtrl.push(IconsPage);
}
changeThisIconName() {
this.notification.iconName = this.iconsPage.returnIconName();
}
}
And that's how I call her and pass her the parameters ( home.ts ):
openEdit() {
this.navCtrl.push(EditPage, {position: this.positionEditNotificationInAllNotifications});
}
How can I solve it?