Files
BitwiseCmd/app/inputCtrl.js
Borys Levytskyi cadafab3ec huge regactoring
2015-04-02 22:53:06 +03:00

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);