import ngModule from '../module'; import Component from 'core/lib/component'; class Controller extends Component { $onInit() { this.moreOptions = [ {callback: this.deleteZone, name: 'Delete'} ]; } onMoreChange(callback) { callback.call(this); } deleteZone() { this.$.deleteZone.show(); } returnDialog(response) { if (response === 'accept') { this.$http.delete(`Zones/${this.zone.id}`).then(() => { this.$state.go('zone.index'); }); } } } ngModule.component('vnZoneDescriptor', { template: require('./index.html'), controller: Controller, bindings: { zone: '<' } });