25 lines
499 B
JavaScript
25 lines
499 B
JavaScript
|
import ngModule from '../../module';
|
||
|
import Popover from '../popover/popover';
|
||
|
|
||
|
export default class Menu extends Popover {
|
||
|
$postLink() {
|
||
|
super.$postLink();
|
||
|
this.element.addEventListener('click',
|
||
|
() => this.onClick());
|
||
|
}
|
||
|
|
||
|
onClick() {
|
||
|
this.hide();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
ngModule.component('vnMenu', {
|
||
|
template: require('../popover/popover.html'),
|
||
|
controller: Menu,
|
||
|
transclude: true,
|
||
|
bindings: {
|
||
|
onOpen: '&?',
|
||
|
onClose: '&?'
|
||
|
}
|
||
|
});
|