import ngModule from '../module'; import './style.scss'; class Controller { constructor($, $http) { Object.assign(this, { $, $http }); } onSubmit() { this.$http.get(`/api/Zones/getEvents`, {params: this.params}) .then(res => this.$.events = res.data); } } Controller.$inject = ['$scope', '$http']; ngModule.component('vnZoneDeliveryDays', { template: require('./index.html'), controller: Controller });