Почему компонент не видит свойства product?
Vue.component('catalog-content-wrap', {
template: '#catalog-content-wrap',
data : function () {
return{
products : [],
filters : [],
message : 'hello'
}
},
mounted () {
this.get_catalog_content();
},
methods : {
get_catalog_content : function () {
this.loader = true;
this.$http.post( Website.href ).then(response => {
this.products = response.body.products;
console.log( response.body.products )
} );
}
}
})
<script type="text/x-template" id="catalog-content-wrap">
<div class="row no-margin catalog-content-wrap" id="catalog-content-wrap" >
<div class="col-md-4 col-sm-4 col-xs-6 mob-product" v-for="product in products">
{{product}}
</div>
</div>
</script>