Repository: incubator-guacamole-client Updated Branches: refs/heads/master b4ea239b5 -> 718e4dab0
GUACAMOLE-136: Make $element available to field type controllers. Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/567df5a4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/567df5a4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/567df5a4 Branch: refs/heads/master Commit: 567df5a467c88871880a4a4cbf99300d379b3ae5 Parents: b4ea239 Author: Michael Jumper <[email protected]> Authored: Mon Dec 5 22:08:15 2016 -0800 Committer: Michael Jumper <[email protected]> Committed: Mon Dec 5 22:09:52 2016 -0800 ---------------------------------------------------------------------- guacamole/src/main/webapp/app/form/services/formService.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/567df5a4/guacamole/src/main/webapp/app/form/services/formService.js ---------------------------------------------------------------------- diff --git a/guacamole/src/main/webapp/app/form/services/formService.js b/guacamole/src/main/webapp/app/form/services/formService.js index d761480..0d12259 100644 --- a/guacamole/src/main/webapp/app/form/services/formService.js +++ b/guacamole/src/main/webapp/app/form/services/formService.js @@ -249,7 +249,10 @@ angular.module('form').provider('formService', function formServiceProvider() { // Populate scope using defined controller if (fieldType.module && fieldType.controller) { var $controller = angular.injector(['ng', fieldType.module]).get('$controller'); - $controller(fieldType.controller, {'$scope' : scope}); + $controller(fieldType.controller, { + '$scope' : scope, + '$element' : angular.element(fieldContainer.childNodes) + }); } // Compile DOM with populated scope
