[Vuejs]-Vue 2 Programmatically Create Toggle Transmissions

0👍

You should create another component, let’s call Togglable. You can pass the content with props or using slots as shown on the docs here

With the new component you can use it for each li. Check v-for as well if your data is dynamic too.

It is going to look similar to this:

<togglable content="hello" button-name="Toggle"></togglable>

Leave a comment