2018-01-25 13:14:58 +00:00
|
|
|
import ngModule from '../module';
|
2018-04-24 12:40:12 +00:00
|
|
|
import './style.scss';
|
2018-01-25 13:14:58 +00:00
|
|
|
|
2018-08-01 10:15:09 +00:00
|
|
|
class Controller {
|
|
|
|
constructor($state) {
|
|
|
|
this.$state = $state;
|
|
|
|
this.links = {};
|
|
|
|
}
|
|
|
|
|
|
|
|
set quicklinks(value = {}) {
|
|
|
|
this._quicklinks = Object.assign(value, this.links);
|
|
|
|
}
|
|
|
|
|
|
|
|
get quicklinks() {
|
|
|
|
return this._quicklinks;
|
|
|
|
}
|
|
|
|
|
|
|
|
quicklinkGo(state, params) {
|
|
|
|
this.$state.go(state, params);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Controller.$inject = ['$state'];
|
|
|
|
|
2018-01-25 13:14:58 +00:00
|
|
|
ngModule.component('vnItemDescriptor', {
|
2018-05-25 08:03:45 +00:00
|
|
|
template: require('./index.html'),
|
2018-08-01 10:15:09 +00:00
|
|
|
controller: Controller,
|
2018-01-25 13:14:58 +00:00
|
|
|
bindings: {
|
2018-03-02 09:51:01 +00:00
|
|
|
item: '<',
|
|
|
|
itemTags: '<',
|
2018-08-01 10:15:09 +00:00
|
|
|
tags: '<',
|
|
|
|
quicklinks: '<'
|
2018-01-25 13:14:58 +00:00
|
|
|
}
|
|
|
|
});
|