function IoTCenter_products() { return Vue.component('IoTCenter_products', function (resolve, reject) { axios.get("/IoTCenter/products.html").then(function (response) { resolve({ template: response.data, data() { return { model: null }; }, mounted: function () { var url = '/IoTCenter/api/v1/product/getProducts'; var component = this; axios.post(url) .then(function (response) { component.model = response.data; }) .catch(function (error) { }) .finally(function () { }); }, methods: { } }) }); }); }