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:
-
Tried ViewChild in app.component; however, no reference found
-
Look into (ionic-angular)Nav.last().getContent()
Can see element in ion-content but not those in ion-header/ion-navbar -
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