(scope, cloneAttachFn, futureParentElement, slotName)
| 10094 | // This is the function that is injected as `$transclude`. |
| 10095 | // Note: all arguments are optional! |
| 10096 | function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) { |
| 10097 | var transcludeControllers; |
| 10098 | // No scope passed in: |
| 10099 | if (!isScope(scope)) { |
| 10100 | slotName = futureParentElement; |
| 10101 | futureParentElement = cloneAttachFn; |
| 10102 | cloneAttachFn = scope; |
| 10103 | scope = undefined; |
| 10104 | } |
| 10105 | |
| 10106 | if (hasElementTranscludeDirective) { |
| 10107 | transcludeControllers = elementControllers; |
| 10108 | } |
| 10109 | if (!futureParentElement) { |
| 10110 | futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element; |
| 10111 | } |
| 10112 | if (slotName) { |
| 10113 | // slotTranscludeFn can be one of three things: |
| 10114 | // * a transclude function - a filled slot |
| 10115 | // * `null` - an optional slot that was not filled |
| 10116 | // * `undefined` - a slot that was not declared (i.e. invalid) |
| 10117 | var slotTranscludeFn = boundTranscludeFn.$$slots[slotName]; |
| 10118 | if (slotTranscludeFn) { |
| 10119 | return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); |
| 10120 | } else if (isUndefined(slotTranscludeFn)) { |
| 10121 | throw $compileMinErr('noslot', |
| 10122 | 'No parent directive that requires a transclusion with slot name "{0}". ' + |
| 10123 | 'Element: {1}', |
| 10124 | slotName, startingTag($element)); |
| 10125 | } |
| 10126 | } else { |
| 10127 | return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild); |
| 10128 | } |
| 10129 | } |
| 10130 | } |
| 10131 | } |
| 10132 |
nothing calls this directly
no test coverage detected