question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: Allow custom/angular navigation on swipe to go back

See original GitHub issue

Feature Request

Ionic version: [x] 4.12.0

Describe the Feature Request The swipe to go back feature is tightly coupled to the NavController. I guess this is the culprit. Since ionic 4 it seems to be the preferred way to directly use angular’s router for navigation (see e.g. here). So it would be nice to have a bit more control over this navigation event.

Describe Preferred Solution Maybe one could pass the swipeHandler on the directive. Something like:

// template
<ion-router-outlet [swipeHandler]="getSwipeHandler()"></ion-router-outlet>

// controller
getSwipeHandler() {
  return {
    canStart: () => { .. },
    onStart: () => { .. },
    onEnd: () => { .. }
  };
}

One downside of this approach would be that one would have to take care of animations oneself.

Describe Alternatives One could also disable this feature, expose swiper and implement this feature oneself. But this seems a bit cumbersome.

Related Code See Describe Preferred Solution

Additional Context This is primarily relevant for iOS.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jonasheinrich-akeliuscommented, May 28, 2019

Hi Liam,

I just wanted you to know that I’m still here. Just didn’t have the time yet to create a sample repo. Hopefully I will be able to do it at latest next week. Sorry about that.

Cheers!

0reactions
ionitron-bot[bot]commented, Jun 27, 2019

Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

Read more comments on GitHub >

github_iconTop Results From Across the Web

feat: Allow custom/angular navigation on swipe to go back ...
we created a rather simple navigation service our own which can simply navigate to urls and go back via location.back . So no...
Read more >
react-navigation swipe to go back doesn't trigger
To be clear I am able to swipe the screen but once I let go of my finger the screen slides back to...
Read more >
Going back with gestures to a specific screen | React Navigation
In this video, I would like to share how to go back to several screens with a back gesture or back button in...
Read more >
Preventing going back
To make this work, you need to: Disable the swipe gesture for the screen ( gestureEnabled: false ). Override the native back button...
Read more >
sitemap-feedback-posts.xml
... -feature-allows-to-get-and-set-the-visible-minimum-and-visible-maximum-of ... /feedback/2291/add-more-animation-for-the-slide-of-the-navigation-drawer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found