Hi guys,
with ionic 2 rc my code worked, but actually after updating to ionic 4 it’s not working anymore.
Although the constructor of the modalPage is executed and all objects/ variables were set before, when loading the HTML file, I get the error _TypeError: Cannot read property ‘value’ of undefined for the object/model.
Please see the simplified example below.
Any idea, why the variable work but objects are not possible to access in this case?
Modal window creation
this.modal = this.modalCtrl.create(ModalPage);
this.modal.present().then(() => { ...}
ModalPage.ts file
export class ModalPage {
value;
counter;
constructor(public someProvider...) {
this.someProvider.getNumber("count").subscribe((data) => {
this.value= { text: 'hallo' };
this.counter = 1;
}
ModalPage HTML File
{{counter}} \\ works
{{value.text}} \\ does not work