3
I’m using Vue in an application where I have a list of items and a button to add more items. By clicking add I load an external html with a component:
<div class="gutters-8 col-lg-6">
<div class="form-group combined-inputs">
<span class="upload-image">
<label>
<i class="material-icons"></i>
<input type="file">
</label>
</span>
<input-animate label="Descrição do produto" type="text"></input-animate>
</div>
</div>
Page opens but does not render component.
Clicking the button to add the component is called the addProduct method:
methods: {
addProduct: function() {
$.get('/do/Suppliers.mvc/ProdutoCatalogo')
.then(function(page){
$('.products-list').prepend(page)
}, function(){
console.log('Erro ao carregar a página')
})
}
}
It would be like a refresh only on the component?
Since you don’t need "refresh", it should work. How are the html tags you’re going to insert? If you’re trying to put
<html>
inside<html>
won’t work– BrTkCa
Could be that, I’ll confirm
– Felipe Coelho
There is no <html> tag on the external page I’m calling
– Felipe Coelho
There is the element with the class
.products-list
?– BrTkCa
There is. This external page it has other html elements besides the component. These others usually display, only the component tag.
– Felipe Coelho