-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bypass link clicks #15
Comments
Hey there, thanks for opening this issue. Do you have a concrete example? I'm having trouble coming up with cases where this is strictly necessary. Thanks! |
Sure - Ill elaborate on the user logins I mentioned above. With Passport + OAuth2, the handling is done server-side, so a hard page load needs to be done against a particular URL, such as Here's an example app with Passport + FB login. Although it's not a SPA, the endpoint for logging in works the same even if it were. |
Ah yeah, this definitely makes sense. I reckon it should probably be part of |
For reference ,In page.js they ignore:
|
@dcorb I quite like that hey |
Default behavior is definitely a good idea, too. I included some default behavior in Backbone.Intercept (an analogous thing for the BB world). Other ideas for things to ignore could be:
Perhaps the idea of default behavior should be a separate issue? I still think the ability to opt-out on a per-link basis is separately important. App requirements can be weird, and it's a bummer to have to turn off this entire feature for a single link that doesn't fit the default behavior, ya know? |
Alright then, so to sum up the stuff we should not trigger an
Adtionally we should also be able to flag links explicitely, for example by setting: <a href="/foo/bar" data-router="false">
my cool link
</a> Or something similar; let me know what you think. |
Sounds good to me, @yoshuawuyts . I just read over the README of Intercept to see if I missed anything, and two things came up. The first is intercepting form submissions that don't have an "action" attribute set. The second is that I provided options to change the behavior of forms and links independently at start up. This could maybe be useful, but less so than everything else mentioned, I think 👌 |
Sometimes relative links need to be handled like usual in JS apps, like when logging in. A pattern I've used to get this functionality is to add a
data-bypass
boolean attr to my links to indicate that it should be bypassed.Is this something you're interested in adding to
sheet-router
directly, or nah? nbd either way – just figured I'd ask the Q.The text was updated successfully, but these errors were encountered: