Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70863

Cannot retrieve name of a modal component

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70863

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>