Is there a way to modify this code in Vue.js to achieve the following:
<template type="login" />
<template type="subscribe" />
<template id="login">
<label>Username</label>
<input placeholder="Enter your username" key="username-input">
</template>
<template id="subscribe">
<label>Email</label>
<input placeholder="Enter your email address" key="email-input">
</template>
Allowing templates to be called by their IDs
For example, using them in events:
<template v-if="type === 'new_user'">
<span>welcome {{ username }}</span>
</template>
<template v-if="type === 'user_confiremd'">
<span>You have full access {{ username }}</span>
</template>
It would be ideal to do something like this:
<template v-for="event in events" :event="event" />