|
480 | 480 | *
|
481 | 481 | * **Mult-slot transclusion** is declared by providing an object for the `transclude` property.
|
482 | 482 | *
|
483 |
| - * This object is a map where the keys are the name of the slot to fill and the value is the element selector |
484 |
| - * used to match the HTML to the slot. Only element names are supported for matching. If the element selector |
485 |
| - * is prefixed with a `?` then that slot is optional. |
| 483 | + * This object is a map where the keys are the name of the slot to fill and the value is an element selector |
| 484 | + * used to match the HTML to the slot. The element selector should be in normalized form (e.g. `myElement`) |
| 485 | + * and will match the standard element variants (e.g. `my-element`, `my:element`, `data-my-element`, etc). |
486 | 486 | *
|
487 |
| - * For example, the transclude object `{ slotA: '?my-custom-element' }` maps `<my-custom-element>` elements to |
| 487 | + * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives} |
| 488 | + * |
| 489 | + * If the element selector is prefixed with a `?` then that slot is optional. |
| 490 | + * |
| 491 | + * For example, the transclude object `{ slotA: '?myCustomElement' }` maps `<my-custom-element>` elements to |
488 | 492 | * the `slotA` slot, which can be accessed via the `$transclude` function or via the {@link ngTransclude} directive.
|
489 | 493 | *
|
490 | 494 | * Slots that are not marked as optional (`?`) will trigger a compile time error if there are no matching elements
|
@@ -1910,7 +1914,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
|
1910 | 1914 |
|
1911 | 1915 | // Add the matching elements into their slot
|
1912 | 1916 | forEach($compileNode.contents(), function(node) {
|
1913 |
| - var slotName = slotMap[nodeName_(node)]; |
| 1917 | + var slotName = slotMap[directiveNormalize(nodeName_(node))]; |
1914 | 1918 | if (slotName) {
|
1915 | 1919 | filledSlots[slotName] = true;
|
1916 | 1920 | slots[slotName] = slots[slotName] || [];
|
|
0 commit comments