MCPcopy
hub / github.com/angular-ui/ui-grid / nodeLinkFn

Function nodeLinkFn

lib/test/angular/1.7.0/angular.js:9954–10130  ·  view source on GitHub ↗
(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn)

Source from the content-addressed store, hash-verified

9952 }
9953
9954 function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
9955 var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
9956 attrs, scopeBindingInfo;
9957
9958 if (compileNode === linkNode) {
9959 attrs = templateAttrs;
9960 $element = templateAttrs.$$element;
9961 } else {
9962 $element = jqLite(linkNode);
9963 attrs = new Attributes($element, templateAttrs);
9964 }
9965
9966 controllerScope = scope;
9967 if (newIsolateScopeDirective) {
9968 isolateScope = scope.$new(true);
9969 } else if (newScopeDirective) {
9970 controllerScope = scope.$parent;
9971 }
9972
9973 if (boundTranscludeFn) {
9974 // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`
9975 // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`
9976 transcludeFn = controllersBoundTransclude;
9977 transcludeFn.$$boundTransclude = boundTranscludeFn;
9978 // expose the slots on the `$transclude` function
9979 transcludeFn.isSlotFilled = function(slotName) {
9980 return !!boundTranscludeFn.$$slots[slotName];
9981 };
9982 }
9983
9984 if (controllerDirectives) {
9985 elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective);
9986 }
9987
9988 if (newIsolateScopeDirective) {
9989 // Initialize isolate scope bindings for new isolate scope directive.
9990 compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||
9991 templateDirective === newIsolateScopeDirective.$$originalDirective)));
9992 compile.$$addScopeClass($element, true);
9993 isolateScope.$$isolateBindings =
9994 newIsolateScopeDirective.$$isolateBindings;
9995 scopeBindingInfo = initializeDirectiveBindings(scope, attrs, isolateScope,
9996 isolateScope.$$isolateBindings,
9997 newIsolateScopeDirective);
9998 if (scopeBindingInfo.removeWatches) {
9999 isolateScope.$on('$destroy', scopeBindingInfo.removeWatches);
10000 }
10001 }
10002
10003 // Initialize bindToController bindings
10004 for (var name in elementControllers) {
10005 var controllerDirective = controllerDirectives[name];
10006 var controller = elementControllers[name];
10007 var bindings = controllerDirective.$$bindings.bindToController;
10008
10009 controller.instance = controller();
10010 $element.data('$' + controllerDirective.name + 'Controller', controller.instance);
10011 controller.bindingInfo =

Callers 1

compositeLinkFnFunction · 0.70

Calls 9

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

Tested by

no test coverage detected