We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have two nuxt applications: main-app and sub-app. main-app: localhost:3000 sub-app: localhost:3001
main-app
sub-app
main-app: localhost:3000
sub-app: localhost:3001
In my sub-app I have one route /pages/item/_id.vue that was mapped in main-app. E.g from main-app: localhost:3000/item/1
/pages/item/_id.vue
localhost:3000/item/1
When I make this: this.$router.push({ name: 'item', params: { id: 1 } }) from main-app the sub-app get id as undefined.
this.$router.push({ name: 'item', params: { id: 1 } })
id
undefined
Can I use router.push or I only have that use vuex to the shared resources between main and sub apps?
router.push
The text was updated successfully, but these errors were encountered:
emmm, because you use the push in main app, the main app don't know the subapp path.
you can image the qiankun in main_app is use you subapp_path to redirect to subapp.
so use the push function in main_app vue-router don't know you think.
solution: you can use the push this.$router.push(/sub-path/item/${id})
/sub-path/item/${id}
Sorry, something went wrong.
No branches or pull requests
I have two nuxt applications:
main-app
andsub-app
.main-app: localhost:3000
sub-app: localhost:3001
In my sub-app I have one route
/pages/item/_id.vue
that was mapped in main-app.E.g from main-app:
localhost:3000/item/1
When I make this:
this.$router.push({ name: 'item', params: { id: 1 } })
from main-app the sub-app getid
asundefined
.Can I use
router.push
or I only have that use vuex to the shared resources between main and sub apps?The text was updated successfully, but these errors were encountered: