mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-136: Make $element available to field type controllers.
This commit is contained in:
@@ -249,7 +249,10 @@ angular.module('form').provider('formService', function formServiceProvider() {
|
|||||||
// Populate scope using defined controller
|
// Populate scope using defined controller
|
||||||
if (fieldType.module && fieldType.controller) {
|
if (fieldType.module && fieldType.controller) {
|
||||||
var $controller = angular.injector(['ng', fieldType.module]).get('$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
|
// Compile DOM with populated scope
|
||||||
|
Reference in New Issue
Block a user