Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routerLink is being followed on swipe #57

Open
raygerrard opened this issue Feb 27, 2019 · 1 comment
Open

routerLink is being followed on swipe #57

raygerrard opened this issue Feb 27, 2019 · 1 comment

Comments

@raygerrard
Copy link

When a routerLink is contained inside a slick item the link is being followed when swiping left or right on mouseup.

@adriankott
Copy link

I know this is old but if anyone needs a workaround this is how i handled it:
in the component for the listItem in slick
(mousedown)="dragStart()" (mouseup)="dragEnd()" (click)="doRouting()"
in the controller :
dragStart() { this.mouseDown = moment(); }
dragEnd() { this.mouseUp = moment(); }

doRouting(r) { if (this.mouseUp.diff(this.mouseDown) > 500) { return false; } this.router.navigate([/route]);
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants