I have a sign up form and there is an Alert component to show the errors, one of the conditionals is "You already have an account click here to log in".
but the error messages are strings that are passed as props for the component "Alert" and the actions "click here" is a link.
<!-- Parent.vue -->
<Alert v-if="!!errorField" :message="errorList[errorField].message" />
here it is the message
// Parent.vue
errorList = {
hasAuth: {
message: `You already have an account <a @click.prevent="hasAuthClick()">click here</a> to log in`
}
}
the Alert component is simple it just recieve the message as prop and render with v-html
<!-- Child.vue -->
<span v-html="message"></span>
By investigations, I just realize that the link is not being compiled by vue, and that's why I can't use the @click on it, but I don't know how to make vue to compile.