Skip to content

Call 'data' hook by router.go() force option and router.reload() #442

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

Closed
wants to merge 666 commits into from

Conversation

tejitak
Copy link
Contributor

@tejitak tejitak commented Apr 1, 2016

Having router reload function (just call data hook for same component) would be a nice feature from several reported issues #296 etc.

  • Add a force: true option for router.go()
    The data hook will be called again even when a current same URL is specified.
    Example:
    • Call this.$router.go({ path: '/a', force: true }) from components
    • Define v-link like <a v-link="{ path: '/inbox/message/123', force: true }">inbox</a> will trigger data hook by every click
  • Add a router.reload()
    • Reload with current path and call data hook again

yyx990803 and others added 22 commits March 8, 2016 03:17
更新了 Lazy Loading Routes 功能介绍
优化lazy load语言表达
Avoid an error when a root '/' for VueRouter is specified (fix vuejs#379)
docs: replace v-repeat to v-for
Fix delegate v-link when router has root configuration
The original code would encode full path differently based on whether the path was supplied as `name` or as `path`. Fixed so that all branches conform to the same encoding order, which is encoding of URI components and then or URI itself. Also, route-recognizer would decode in inverse order (first decode URI components and then URI). That was fixed as well (encode and decode orders should be inverse).
@lepture
Copy link

lepture commented Apr 20, 2016

You need to rebase this branch

@Makio64
Copy link

Makio64 commented Jun 17, 2016

Will be great if this branch is rebase and this feature integrated.

@Makio64
Copy link

Makio64 commented Jul 2, 2016

I try this by patching my router manullay and actually the pipeline is activated and the transitionOut is playing but then there is something blocking in the canDeactivate and the pipeline is stop.. :(

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.