MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / nodeLinkFn

Function nodeLinkFn

lib/test/angular/1.5.0/angular.js:8867–9023  ·  view source on GitHub ↗
(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn)

Source from the content-addressed store, hash-verified

8865 }
8866
8867 function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
8868 var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
8869 attrs, removeScopeBindingWatches, removeControllerBindingWatches;
8870
8871 if (compileNode === linkNode) {
8872 attrs = templateAttrs;
8873 $element = templateAttrs.$$element;
8874 } else {
8875 $element = jqLite(linkNode);
8876 attrs = new Attributes($element, templateAttrs);
8877 }
8878
8879 controllerScope = scope;
8880 if (newIsolateScopeDirective) {
8881 isolateScope = scope.$new(true);
8882 } else if (newScopeDirective) {
8883 controllerScope = scope.$parent;
8884 }
8885
8886 if (boundTranscludeFn) {
8887 // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`
8888 // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`
8889 transcludeFn = controllersBoundTransclude;
8890 transcludeFn.$$boundTransclude = boundTranscludeFn;
8891 // expose the slots on the `$transclude` function
8892 transcludeFn.isSlotFilled = function(slotName) {
8893 return !!boundTranscludeFn.$$slots[slotName];
8894 };
8895 }
8896
8897 if (controllerDirectives) {
8898 elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope);
8899 }
8900
8901 if (newIsolateScopeDirective) {
8902 // Initialize isolate scope bindings for new isolate scope directive.
8903 compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||
8904 templateDirective === newIsolateScopeDirective.$$originalDirective)));
8905 compile.$$addScopeClass($element, true);
8906 isolateScope.$$isolateBindings =
8907 newIsolateScopeDirective.$$isolateBindings;
8908 removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,
8909 isolateScope.$$isolateBindings,
8910 newIsolateScopeDirective);
8911 if (removeScopeBindingWatches) {
8912 isolateScope.$on('$destroy', removeScopeBindingWatches);
8913 }
8914 }
8915
8916 // Initialize bindToController bindings
8917 for (var name in elementControllers) {
8918 var controllerDirective = controllerDirectives[name];
8919 var controller = elementControllers[name];
8920 var bindings = controllerDirective.$$bindings.bindToController;
8921
8922 if (controller.identifier && bindings) {
8923 removeControllerBindingWatches =
8924 initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);

Callers 1

compositeLinkFnFunction · 0.70

Calls 9

setupControllersFunction · 0.70
forEachFunction · 0.70
isObjectFunction · 0.70
extendFunction · 0.70
getControllersFunction · 0.70
isFunctionFunction · 0.70
invokeLinkFnFunction · 0.70
isArrayFunction · 0.50

Tested by

no test coverage detected