Skip to content

Instantly share code, notes, and snippets.

@legitYosal
Created May 21, 2020 17:37
Show Gist options
  • Save legitYosal/9729fdcb4c65f72ba722bb247b136b2b to your computer and use it in GitHub Desktop.
Save legitYosal/9729fdcb4c65f72ba722bb247b136b2b to your computer and use it in GitHub Desktop.
passing props to components created by vue-router
<template>
<div id="some-thing">
<router-view :some-value-to-pass="localValue"></router-view>
</div>
</template>
@legitYosal
Copy link
Author

in the component you add:
props: { someValueToPass: String },
and then if name matches props get passed to component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment