mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-10 23:12:09 +01:00
24 lines
521 B
JavaScript
24 lines
521 B
JavaScript
(function(){
|
|
function subscribeEvents(element) {
|
|
element.addEventListener('keyup', function(args) {
|
|
|
|
if(args.keyCode == 13) {
|
|
// Enter
|
|
app.command('dispatchInput').execute({ input: args.srcElement.value });
|
|
args.srcElement.value = '';
|
|
}
|
|
|
|
console.log(args)
|
|
});
|
|
}
|
|
|
|
app.controller('expressionInputCtrl', {
|
|
bind: function (element) {
|
|
subscribeEvents(element);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
})(window.app);
|