salix/client/item/src/descriptor/index.js

35 lines
663 B
JavaScript
Raw Normal View History

import ngModule from '../module';
import './style.scss';
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'];
ngModule.component('vnItemDescriptor', {
template: require('./index.html'),
controller: Controller,
bindings: {
item: '<',
itemTags: '<',
tags: '<',
quicklinks: '<'
}
});