Me gustaría ejecutar un código dentro de un elemento html después de una solicitud xhr
Solía usar JQUERY $(el).html(data)
y funcionó bien
Ahora tratando de deshacerse de jquery
Probé tanto Vanilla JS innerHTML
como vue3 v-html
pero el script nunca se ejecuta
Puedo verlo en html
Aquí está el código:
axios.get('/getAarea/blog') .then(response => { const data = response.data; if (!data.report) { const el = $("#ContentUserPanel") el.html(data) this.loading = false this.selected = this.types.blogs this.toggleUserMobileMenu() } else { Error('There was an error ',data.report) this.loading = false this.selected = null } }) .catch(err => { Error('There was an error ',err) this.loading = false this.selected = null });
¿Alguien podría explicar?