@Ritzlgrmft wrote:
I want to add some logging to all my pages. Mainly I want to log the ionViewDidEnter event. Since I need this functionality on every page, I do not want to add the component's name there hard-coded. Instead I want to use a more generic approach.
The following is working well for pages:
public ionViewDidEnter(): void { let viewName = this.navController.first().name; ... }
However, when I add the same code to a modal's component, viewName has always the value ModalCmp.
Is there a way to retrieve the name of the modal's component generically?
Posts: 1
Participants: 1