I spent some time trying to find any documentation for $ element, but havent been able to find any in the official corners docs.
$element is one of the four locales that $compileProvider gives $controllerProvider , which is then assigned to $injector . The injector introduces local residents into your controller function only if specified.
Four locals:
$scope$element$attrs$transclude
White papers: AngularJS $ compile Service API Reference - Controller
Download source package github angular.js / compile.js :
function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope) { var elementControllers = createMap(); for (var controllerKey in controllerDirectives) { var directive = controllerDirectives[controllerKey]; var locals = { $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope, $element: $element, $attrs: attrs, $transclude: transcludeFn }; var controller = directive.controller; if (controller == '@') { controller = attrs[directive.name]; } var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
source share