Problem with component rendering in vue.js and axios

0

I have the following code:

The server replies: <h1>Hola !!!</h1> <br> <p>Bienvenido a Vue.js</p>

When it runs in the browser, the following happens:

How can I do it to show me this way and not as a text:

If someone can give me a suggestion, I thank you very much

    
asked by CodeBuilds 09.06.2018 в 17:27
source

1 answer

0

In order for you to render the HTML correctly you must use the v-html directive.
Documentation of vuejs RawHtml.

You must do this:

<template id="saludo">
  <div v-html="componentSaludo"></div>
</template>
    
answered by 03.12.2018 в 01:44