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

Function nodeLinkFn

test/angular/1.6/angular.js:9926–10124  ·  view source on GitHub ↗
(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn)

Source from the content-addressed store, hash-verified

9924 }
9925
9926 function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
9927 var i, ii, linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
9928 attrs, scopeBindingInfo;
9929
9930 if (compileNode === linkNode) {
9931 attrs = templateAttrs;
9932 $element = templateAttrs.$$element;
9933 } else {
9934 $element = jqLite(linkNode);
9935 attrs = new Attributes($element, templateAttrs);
9936 }
9937
9938 controllerScope = scope;
9939 if (newIsolateScopeDirective) {
9940 isolateScope = scope.$new(true);
9941 } else if (newScopeDirective) {
9942 controllerScope = scope.$parent;
9943 }
9944
9945 if (boundTranscludeFn) {
9946 // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`
9947 // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`
9948 transcludeFn = controllersBoundTransclude;
9949 transcludeFn.$$boundTransclude = boundTranscludeFn;
9950 // expose the slots on the `$transclude` function
9951 transcludeFn.isSlotFilled = function(slotName) {
9952 return !!boundTranscludeFn.$$slots[slotName];
9953 };
9954 }
9955
9956 if (controllerDirectives) {
9957 elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope, newIsolateScopeDirective);
9958 }
9959
9960 if (newIsolateScopeDirective) {
9961 // Initialize isolate scope bindings for new isolate scope directive.
9962 compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||
9963 templateDirective === newIsolateScopeDirective.$$originalDirective)));
9964 compile.$$addScopeClass($element, true);
9965 isolateScope.$$isolateBindings =
9966 newIsolateScopeDirective.$$isolateBindings;
9967 scopeBindingInfo = initializeDirectiveBindings(scope, attrs, isolateScope,
9968 isolateScope.$$isolateBindings,
9969 newIsolateScopeDirective);
9970 if (scopeBindingInfo.removeWatches) {
9971 isolateScope.$on('$destroy', scopeBindingInfo.removeWatches);
9972 }
9973 }
9974
9975 // Initialize bindToController bindings
9976 for (var name in elementControllers) {
9977 var controllerDirective = controllerDirectives[name];
9978 var controller = elementControllers[name];
9979 var bindings = controllerDirective.$$bindings.bindToController;
9980
9981 if (preAssignBindingsEnabled) {
9982 if (bindings) {
9983 controller.bindingInfo =

Callers 1

compositeLinkFnFunction · 0.70

Calls 11

controllerFunction · 0.85
isArrayFunction · 0.85
$onInitMethod · 0.80
setupControllersFunction · 0.70
forEachFunction · 0.70
isObjectFunction · 0.70
extendFunction · 0.70
getControllersFunction · 0.70
isFunctionFunction · 0.70
invokeLinkFnFunction · 0.70

Tested by

no test coverage detected