mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-23 21:22:48 +01:00
Replaced service location by dependency injection
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
(function(app){
|
||||
|
||||
app.controller('expressionInputCtrl', {
|
||||
$dispatcher:null,
|
||||
attachView: function (viewElement) {
|
||||
var dispatcher = app.service('dispatcher');
|
||||
|
||||
viewElement.addEventListener('keyup', function (args) {
|
||||
if (args.keyCode != 13) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Enter
|
||||
dispatcher.dispatch(args.srcElement.value);
|
||||
this.$dispatcher.dispatch(args.srcElement.value);
|
||||
args.srcElement.value = '';
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user