blob: 14fb3db73e76883b38aeeb8247ecbea3c7180c68 [file] [log] [blame]
class DemoComponent {
static $inject = ['XosSidePanel', 'XosKeyboardShortcut'];
constructor(
private XosSidePanel: any,
private XosKeyboardShortcut: any
) {
this.XosKeyboardShortcut.registerKeyBinding({
key: 'v',
description: 'Alert popup',
cb: () => {
alert('This binding is provided by the "xos-sample-gui-extension"');
},
}, 'view');
}
togglePanel() {
this.XosSidePanel.injectComponent('xosAlert', {config: {type: 'info'}, show: true}, 'This content is injected by my sample UI extension');
}
}
export const xosDemoComponent: angular.IComponentOptions = {
template: require('./demo.html'),
controllerAs: 'vm',
controller: DemoComponent
};