You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I include a Blaze template from Vue app which uses Vue router, and that Blaze template wants to provide a link which would change the current page/route in Vue router, how can I do that?
So what is equivalent of <router-link to="/foo">Go to Foo</router-link> in Blaze?
If I include a Blaze template from Vue app which uses Vue router, and that
Blaze template wants to provide a link which would change the current
page/route in Vue router, how can I do that?
So what is equivalent of <router-link to="/foo">Go to Foo</router-link>
in Blaze?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#223>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACqyfJwam5CPm23iVUqqVa_NKU9JtVEBks5sNei6gaJpZM4OWwqv>
.
But that will probably make the link a non-single-page-link and will force the browser to reload the whole app? It seems one would have to do something like:
router.push(router.resolve(...))
I have no tested any of this. The tricky thing is how to get access to router instance.
Maybe a Blaze template for this links would be useful. Something like:
{{#vue-router-linkto="/foo"}}Go to Foo{{/vue-router-link}}
Activity
Akryum commentedon Jul 13, 2017
mitar commentedon Jul 13, 2017
But that will probably make the link a non-single-page-link and will force the browser to reload the whole app? It seems one would have to do something like:
I have no tested any of this. The tricky thing is how to get access to
router
instance.Maybe a Blaze template for this links would be useful. Something like:
Not sure how to get
a
to match only the made anchor link.Akryum commentedon Jul 13, 2017
I don't think so.
If you want to use
router.push()
, you don't need the resolve part, just put the route object directly.mitar commentedon Jul 14, 2017
I tested it, it reloads the page. I made this app have a link from Blaze.
I will make a Blaze template to resolve this.
mitar commentedon Jul 15, 2017
I have ended up remake the package for Blaze integration, where I fixed also this. See it here.