salix/front/core/components/treeview/child.js

28 lines
549 B
JavaScript

import ngModule from '../../module';
import Component from '../../lib/component';
class Controller extends Component {
constructor($element, $scope) {
super($element, $scope);
}
toggle(item) {
this.treeview.onToggle(item);
}
select(item, value) {
this.treeview.onSelection(item, value);
}
}
ngModule.component('vnTreeviewChild', {
template: require('./child.html'),
controller: Controller,
bindings: {
items: '<'
},
require: {
treeview: '^vnTreeview'
}
});