(scope, cloneAttachFn, futureParentElement, slotName)
| 10670 | // This is the function that is injected as `$transclude`. |
| 10671 | // Note: all arguments are optional! |
| 10672 | function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) { |
| 10673 | var transcludeControllers; |
| 10674 | // No scope passed in: |
| 10675 | if (!isScope(scope)) { |
| 10676 | slotName = futureParentElement; |
| 10677 | futureParentElement = cloneAttachFn; |
| 10678 | cloneAttachFn = scope; |
| 10679 | scope = undefined; |
| 10680 | } |
| 10681 | |
| 10682 | if (hasElementTranscludeDirective) { |
| 10683 | transcludeControllers = elementControllers; |
| 10684 | } |
| 10685 | if (!futureParentElement) { |
| 10686 | futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element; |
| 10687 | } |
| 10688 | if (slotName) { |
| 10689 | // slotTranscludeFn can be one of three things: |
| 10690 | // * a transclude function - a filled slot |
| 10691 | // * `null` - an optional slot that was not filled |
| 10692 | // * `undefined` - a slot that was not declared (i.e. invalid) |
| 10693 | var slotTranscludeFn = boundTranscludeFn.$$slots[slotName]; |
| 10694 | if (slotTranscludeFn) { |
| 10695 | return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); |
| 10696 | } else if (isUndefined(slotTranscludeFn)) { |
| 10697 | throw $compileMinErr('noslot', |
| 10698 | 'No parent directive that requires a transclusion with slot name "{0}". ' + |
| 10699 | 'Element: {1}', |
| 10700 | slotName, startingTag($element)); |
| 10701 | } |
| 10702 | } else { |
| 10703 | return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); |
| 10704 | } |
| 10705 | } |
| 10706 | } |
| 10707 | } |
| 10708 |
nothing calls this directly
no test coverage detected