Passing props with programmatic navigation Vue.js

Use params.

this.$router.push({ name: 'foo', params: {title: 'test title' }})

Note: You have to specify name. This does not work if you call this.$router.push using path.

And set the route to accept params as props.

{path: "/foo", name:"foo", component: FooComponent,  props: true}

props: true is documented here.

Leave a Comment