Debugger can now connect. AngularJS: I have no idea what I'm doing.
This commit is contained in:
26
debugger/src/directives.js
Normal file
26
debugger/src/directives.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('xe.directives', []);
|
||||
|
||||
|
||||
module.directive('uiEnter', function() {
|
||||
return function($scope, element, attrs) {
|
||||
element.bind("keydown keypress", function(e) {
|
||||
if(e.which === 13) {
|
||||
$scope.$apply(function(){
|
||||
$scope.$eval(attrs.uiEnter);
|
||||
});
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user