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

Access page child component in app.component.ts

$
0
0

@john33john33 wrote:

Case:
handle hardware back button in app.component
in some pages, there’s
If exist custom back button, call “back” function inside that component
Else, use pop in nav controller if stack length > 1

Idea:

  1. Tried ViewChild in app.component; however, no reference found

  2. Look into (ionic-angular)Nav.last().getContent()
    Can see element in ion-content but not those in ion-header/ion-navbar

  3. Look into current view controller
    But no sign of child component of the page

Question:
In app.component, how to access current page element?

Thanks all

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70442

Trending Articles



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