After successfully inheriting a class, I am facing an issue in calling the super method from the template. The error message that I currently receive is
Cannot read property 'presentModal' of undefined
:
@Component({})
class Dia {
constructor(public modalCtrl: ModalController) {
}
presentModal() {
const detailModal = this.modalCtrl.create(AgendaDetails, { showDetails: 8675309 });
detailModal.present();
}
}
@Component({
templateUrl: 'dimarts-tab.html',
})
export class Dimarts extends Dia { }
The template code looks like this:
<ion-item text-wrap (click)="super.presentModal()">
I have also tried using $super and $parent but without any success. Currently, the only solution that works is to create the method in Dimarts
and then call super from there.
Any suggestions on how to resolve this issue?