You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the linked page (I am referencing the Angular (Standalone) tab), the IonRouterOutlet is injected via the constructor.
However, this only works if it used in a subcomponent of the app and not in AppComponent and, I would argue that this is a rather uncommon use-case, as the usual developer probably only wants to add it to the top-most component.
In my case, I had to search for quite some time to find a really neat solution in the following issue comment, and according to the reactions I am not alone (note that the issue is also locked since nearly 4 years!): ionic-team/ionic-framework#21630 (comment)
IMO, the docs example should show a working way of implementing the default behavior (like in native Android apps) in a straightforward way like:
URL
https://ionicframework.com/docs/developing/hardware-back-button#exiting-the-app
Issue Description
On the linked page (I am referencing the
Angular (Standalone)
tab), theIonRouterOutlet
is injected via the constructor.However, this only works if it used in a subcomponent of the app and not in
AppComponent
and, I would argue that this is a rather uncommon use-case, as the usual developer probably only wants to add it to the top-most component.In my case, I had to search for quite some time to find a really neat solution in the following issue comment, and according to the reactions I am not alone (note that the issue is also locked since nearly 4 years!):
ionic-team/ionic-framework#21630 (comment)
IMO, the docs example should show a working way of implementing the default behavior (like in native Android apps) in a straightforward way like:
The text was updated successfully, but these errors were encountered: