Skip to content

Conversation

@flahertyb
Copy link
Contributor

Some folks might not want to use hash routes, even if the browser doesn't support push state. So I've added a change such that you can specify fallbackToHashRoutes as false. Specifying this option means:

Aviator.dispatch() would still perform the right action based on the url, but calls to navigate trigger full page refreshes, links work as normal, and Aviator doesn't intercept calls to the back button.

With this commit, we are skipping the whole _attachEvents step. To actually have links work as normal, when a root is specified, we need to actually still intercept navigate link clicks so as to prepend the root.

@barnabyc @hojberg @nahiluhmot

Some folks might not want to use hash routes, even if the
browser doesn't support push state. This adds an option
to fallback to full page refreshes upon calls to `navigate`.
@flahertyb
Copy link
Contributor Author

So, still need a commit to fix that link/root situation, and to fix these tests. Curious what y'all think though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.pushStateEnabled || this.fallbackToHashRoutes could probably be refactored into a function since it's now used so much.

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

Successfully merging this pull request may close these issues.

3 participants