Hello,
I’m trying to get the view name when using --prod mode.
In the constructor of the page i make this:
console.log("Active view is Login?: ", this.viewCtrl.component == LoginPage); and works fine. I get TRUE.
But, one line before that i make this:
document.addEventListener(‘backbutton’, ()=>{
if(this.viewCtrl.component == LoginPage){
appMinimize.minimize();
} else {
this.goBack();
}
}, false);
console.log("Active view is Login?: ", this.viewCtrl.component == LoginPage);
It gives me an error: Uncaught TypeError: Cannot read property ‘component’ of undefined.
This is when hit the Hardware back button of the android device.
Any help please?