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