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

28 lines
535 B
JavaScript
Raw Normal View History

2019-01-21 10:45:53 +00:00
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) {
this.treeview.onSelection(item);
}
}
ngModule.component('vnTreeviewChild', {
template: require('./child.html'),
controller: Controller,
bindings: {
items: '<'
},
require: {
treeview: '^vnTreeview'
}
});