(scope, cloneAttachFn, futureParentElement, slotName)
| 10017 | // This is the function that is injected as `$transclude`. |
| 10018 | // Note: all arguments are optional! |
| 10019 | function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) { |
| 10020 | var transcludeControllers; |
| 10021 | // No scope passed in: |
| 10022 | if (!isScope(scope)) { |
| 10023 | slotName = futureParentElement; |
| 10024 | futureParentElement = cloneAttachFn; |
| 10025 | cloneAttachFn = scope; |
| 10026 | scope = undefined; |
| 10027 | } |
| 10028 | |
| 10029 | if (hasElementTranscludeDirective) { |
| 10030 | transcludeControllers = elementControllers; |
| 10031 | } |
| 10032 | if (!futureParentElement) { |
| 10033 | futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element; |
| 10034 | } |
| 10035 | if (slotName) { |
| 10036 | // slotTranscludeFn can be one of three things: |
| 10037 | // * a transclude function - a filled slot |
| 10038 | // * `null` - an optional slot that was not filled |
| 10039 | // * `undefined` - a slot that was not declared (i.e. invalid) |
| 10040 | var slotTranscludeFn = boundTranscludeFn.$$slots[slotName]; |
| 10041 | if (slotTranscludeFn) { |
| 10042 | return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); |
| 10043 | } else if (isUndefined(slotTranscludeFn)) { |
| 10044 | throw $compileMinErr('noslot', |
| 10045 | 'No parent directive that requires a transclusion with slot name "{0}". ' + |
| 10046 | 'Element: {1}', |
| 10047 | slotName, startingTag($element)); |
| 10048 | } |
| 10049 | } else { |
| 10050 | return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); |
| 10051 | } |
| 10052 | } |
| 10053 | } |
| 10054 | } |
| 10055 |
nothing calls this directly
no test coverage detected