(scope, transcludeFn, previousBoundTranscludeFn)
| 9868 | } |
| 9869 | |
| 9870 | function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) { |
| 9871 | function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) { |
| 9872 | |
| 9873 | if (!transcludedScope) { |
| 9874 | transcludedScope = scope.$new(false, containingScope); |
| 9875 | transcludedScope.$$transcluded = true; |
| 9876 | } |
| 9877 | |
| 9878 | return transcludeFn(transcludedScope, cloneFn, { |
| 9879 | parentBoundTranscludeFn: previousBoundTranscludeFn, |
| 9880 | transcludeControllers: controllers, |
| 9881 | futureParentElement: futureParentElement |
| 9882 | }); |
| 9883 | } |
| 9884 | |
| 9885 | // We need to attach the transclusion slots onto the `boundTranscludeFn` |
| 9886 | // so that they are available inside the `controllersBoundTransclude` function |
| 9887 | var boundSlots = boundTranscludeFn.$$slots = createMap(); |
| 9888 | for (var slotName in transcludeFn.$$slots) { |
| 9889 | if (transcludeFn.$$slots[slotName]) { |
| 9890 | boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn); |
| 9891 | } else { |
| 9892 | boundSlots[slotName] = null; |
| 9893 | } |
| 9894 | } |
| 9895 | |
| 9896 | return boundTranscludeFn; |
| 9897 | } |
| 9898 | |
| 9899 | /** |
| 9900 | * Looks for directives on the given node and adds them to the directive collection which is |
no test coverage detected