I am extremely sorry for the spelling mistake.
I meant to type ionViewDidLoad()
which I got to know form this document.
ionViewDidLoad(){
this.events.subscribe('update-menu-title', (userInfo) => { // listener for "update-menu-title" event
// Usage of 'userInfo'
})
}
Also, I found out the Ionic page life cycle events will not trigger from app.component.ts
because it is not a normal page. Only Angular life cycle hooks will work.
This is explained in this forum question and in this reported issue.
But, I am still unable to understand why optimized build ionic cordova build/emulate android --prod
is not trigerring custom event listener if I modify my code as mentioned in point 2
in original question.