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

flow: support fragment in routing and navigateRequest (v2) #464

x1B opened this issue May 11, 2017 · 1 comment

flow: support fragment in routing and navigateRequest (v2) #464

x1B opened this issue May 11, 2017 · 1 comment


Copy link

@x1B x1B commented May 11, 2017

Implement #463 for LaxarJS v2


This comment has been minimized.

Copy link
Member Author

@x1B x1B commented Jun 2, 2017

Implemented on master (v2.0.0).
For a LaxarJS v1 version of this feature, see #463

Upgrade Information

When using HTML5-mode routing, navigation events now transparently translate the fragment identifier to/from the browser URL:

  • navigateRequest events may use the new payload attribute fragment side-by-side with data to set a location fragment aka hash (the part behind the # in URLs),
  • similarly, axFlowService.constructAbsoluteUrl can be used to generate a URL with fragment by specifying a third call parameter,
  • the fragment from the browser location is now published by the LaxarJS runtime through didNavigate events.

The runtime does _not_automatically scroll the browser window or scrollable elements to reflect the current anchor. However, the browser may automatically do so when only the fragment of an already loaded page was changed by activating a link.

Also, specifying the fragment in a navigateRequest event always causes a new history entry to be appended, just like when changing a place parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.