Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($compile): allow transclude maps to use normalized camelCase element names #13455

Closed

Conversation

petebacondarwin
Copy link
Contributor

The ability to do this was removed at c3a2691#diff-a732922b631efed1b9f33a24082ae0dbL1881

On second thoughts we should support both camelCase normalized and exact match elements.

Closes #13439

* used to match the HTML to the slot. Only element names are supported for matching. If the element selector
* is prefixed with a `?` then that slot is optional.
* This object is a map where the keys are the name of the slot to fill and the value is an element selector
* used to match the HTML to the slot. The element selector can be in normalized camelCase form and will match
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could link to the directive guide/normalization here

@Narretz
Copy link
Contributor

Narretz commented Dec 7, 2015

I wonder what happens if we have an "svg directive"? Because some svg elements are camelCased: https://developer.mozilla.org/docs/Web/SVG/Element

@Narretz Narretz added this to the 1.5.0-rc.0 milestone Dec 7, 2015
@Narretz
Copy link
Contributor

Narretz commented Dec 7, 2015

Another thing: is it worth mentioning that slot transclusion always transcludes the element and not just its contents?

@petebacondarwin
Copy link
Contributor Author

Another thing: is it worth mentioning that slot transclusion always transcludes the element and not just its contents?

Yes - I will add that

@Narretz
Copy link
Contributor

Narretz commented Dec 7, 2015

We just need to make sure this BC doesn't make it into the migration docs. Can you amend the commit message to say this only affects 1.5.0 betas?

@Narretz
Copy link
Contributor

Narretz commented Dec 7, 2015

Also, the commit message doesn't reflect what the commit actually does.

Otherwise, LGTM

Closes angular#13439

BREAKING CHANGE:

The keys and values for the `transclude` map of the directive definition
have been swapped around to be more consistent with the other maps, such
as `scope` and `bindToController`.

Now the key is the slot name and the value is an element selector.
@petebacondarwin petebacondarwin deleted the multi-slot-normalize branch November 24, 2016 09:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants