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

28 lines
535 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) {
this.treeview.onSelection(item);
}
}
ngModule.component('vnTreeviewChild', {
template: require('./child.html'),
controller: Controller,
bindings: {
items: '<'
},
require: {
treeview: '^vnTreeview'
}
});