Renamed dispatcher to cmd

This commit is contained in:
Borys Levytskyi
2015-04-05 13:21:31 +03:00
parent b8a7d87055
commit e86126487a
4 changed files with 13 additions and 14 deletions

View File

@@ -2,12 +2,10 @@ app.compose(function() {
"use strict";
app.controller('expressionInputCtrl', function (){
var dispatcher = app.get('dispatcher');
var cmd = app.get('cmd');
return {
onViewAttached: function () {
var d = dispatcher;
var self = this;
self.history =[];
self.historyIndex = 0;
@@ -22,7 +20,7 @@ app.compose(function() {
}
// Enter
d.dispatch(inpt.value);
cmd.execute(inpt.value);
self.history.unshift(inpt.value);
self.historyIndex = 0;
inpt.value = '';