import ngModule from '../../module'; import Descriptor from 'salix/components/descriptor'; class Controller extends Descriptor { get roadmap() { return this.entity; } set roadmap(value) { this.entity = value; } onDelete() { return this.$http.delete(`Roadmaps/${this.roadmap.id}`) .then(() => this.$state.go('route.roadmap')) .then(() => this.vnApp.showSuccess(this.$t('Roadmap removed'))); } } ngModule.component('vnRoadmapDescriptor', { template: require('./index.html'), controller: Controller, bindings: { roadmap: '<' } });