Created
May 21, 2020 17:37
-
-
Save legitYosal/9729fdcb4c65f72ba722bb247b136b2b to your computer and use it in GitHub Desktop.
passing props to components created by vue-router
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="some-thing"> | |
<router-view :some-value-to-pass="localValue"></router-view> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in the component you add:
props: { someValueToPass: String },
and then if name matches props get passed to component.