mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2026-01-04 11:02:36 +01:00
23 lines
448 B
JavaScript
23 lines
448 B
JavaScript
(function(){
|
|
function subscribeEvents(element) {
|
|
element.addEventListener('keyup', function(args) {
|
|
|
|
if(args.keyCode == 13) {
|
|
// Enter
|
|
app.command('calculateExpression').fire();
|
|
}
|
|
|
|
console.log(args)
|
|
});
|
|
}
|
|
|
|
app.controller('expressionInputCtrl', {
|
|
bind: function (element) {
|
|
subscribeEvents(element);
|
|
}
|
|
});
|
|
|
|
|
|
|
|
})(window.app);
|