mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(back-button): subscribe to body
This commit is contained in:
@ -21,7 +21,7 @@ export class NavController {
|
||||
private location: Location,
|
||||
@Optional() private router?: Router
|
||||
) {
|
||||
window && window.addEventListener('ionBackButton', (ev) => {
|
||||
window && window.document.body.addEventListener('ionBackButton', (ev) => {
|
||||
(ev as BackButtonEvent).detail.register(0, () => this.goBack());
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user