- Create your parent Component with the logic it should have
- Create functional components for each template you want
- in the parent component create a dynamic component element <component :is=... and pass the props and event listeners to the functional component
- in the functional components retrieve the props from the props object and the event listeners from the listeners object e.g @click="listeners.myClick" {{props.aprop}}
- In the parent component create a computed or ordinary method and pass it as the value to the components attribute :is <component :is=theComputedProperty
-
Notifications
You must be signed in to change notification settings - Fork 0
a way to dynamically render a different vue template in your component
License
lkounadis/DynamicVueTemplates
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
a way to dynamically render a different vue template in your component
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published