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