Hello, I'm starting in the world of vuejs I'm consuming a detail field where I have HTML code:
<p>alhdlkfjaldkfkaldjflkasdfkladsf</p>
<p>asdfaslfdjaslñfjalñsdfjlkñasjfdklajsdfasf</p>
<p>adsfadsf</p>
How do I run the HTML when executing the code and not display the <p>
tags and the others?
my json is like this:
"detalle": "<p>alhdlkfjaldkfkaldjflkasdfkladsf</p><p>asdfaslfdjaslñfjalñsdfjlkñasjfdklajsdfasf</p><p>adsfadsf</p>",
my full code
<div id="app" v-cloak>
<div class="sk-double-bounce" v-if="solicitud.length === 0">
<div class="sk-child sk-double-bounce1"></div>
<div class="sk-child sk-double-bounce2"></div>
</div>
<div class="grid-item-content" :style="{ 'background': solicitud.color }">
<div class="text-center" style="border-bottom: 2px solid #333"><h3>Nota #{{ solicitud.id}}</h3></div>
<div><h4>{{ solicitud.nombre }}</h4></div>
<div><h4>{{ solicitud.celular }}</h4></div>
<div><h5>{{ solicitud.email }}</h5></div>
<div :id="solicitud.id">{{ solicitud.detalle }}</div>
</div>
</div>
<script type="text/javascript">
var urlSolicitudes = "<?php echo DOMINIO ?>api/solicitudes";
new Vue({
el: '#app',
created: function() {
this.getSolicitudes();
},
data: {
listSolicitudes: []
},
methods: {
getSolicitudes: function() {
axios.get(urlSolicitudes).then(response => {
this.listSolicitudes = response.data
});
}
}
});
Thanks