vtortola / ng-terminal-emulator

Toy terminal emulator built with Angular JS.
http://vtortola.github.io/ng-terminal-emulator/
MIT License
153 stars 44 forks source link

add this code to "vtortola.ng-terminal." in src folder, for Async outputs. #17

Closed peq42 closed 6 years ago

peq42 commented 6 years ago

Place this code right under the function " $scope.keypress= function (keyCode) " in that file, insice src

azbcdefgh=function azbcdefghh(){
    $scope.commandLine += ""
            $scope.$$phase || $scope.$apply()

        }
setInterval(azbcdefgh,500)

That way, the console will get async outputs every 0,5 seconds(Which nowadays it doesn't, requiring you to press a key to update it and get the text output, for example, of the websocket command, once connected). It doesn't generate any performance problems that I could notice(also, 1 execution every half second isn't going to impact that much in performance)

I didn't know how to post this in Pull requests, so i'm sorry....