Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

feat(components): add support for multiple insertion points #1290

Closed

Conversation

vsavkin
Copy link
Contributor

@vsavkin vsavkin commented Jul 31, 2014

This PR depends on #1293.

The current implementation of transcluding components is very limited and allows only one insertion point (a wildcard) and does not support redistribution. This PR adds multiple support for multiple insertion points:

<content select=".A"></content>
<some-component>
  <content></content>
</some-component>


_replaceContentElementWithScriptTags() {
_beginScript = new dom.ScriptElement()
..setAttribute("content-tag-id", _content.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

4 ws

Copy link
Contributor

Choose a reason for hiding this comment

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

create a static one and clone it, Should be faster than creating it all the time.

@vicb
Copy link
Contributor

vicb commented Jul 31, 2014

@vsavkin could you please add some comment about what the PR is supposed to enabled in the PR header ?

@vsavkin vsavkin added cla: yes and removed cla: no labels Jul 31, 2014
@@ -332,10 +338,18 @@ class DirectiveInjector implements DirectiveBinder {

NgElement get ngElement {
if (_ngElement == null) {
_ngElement = new NgElement(_node, scope, _animate);
_ngElement = new NgElement(_node, scope, _animate, getByKey(DESTINATION_LIGHT_DOM_KEY));
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of getByKey, can't you just do parent.lightDOM? Should be faster.

@vsavkin vsavkin changed the title feat(components): adds support for multiple insertion points [WIP] feat(components): adds support for multiple insertion points Aug 6, 2014
@vsavkin vsavkin changed the title feat(components): adds support for multiple insertion points feat(components): add support for multiple insertion points Aug 6, 2014
@mhevery
Copy link
Contributor

mhevery commented Aug 7, 2014

Few minor comments, but otherwise this looks good to me.

@jbdeboer
Copy link
Contributor

Test and rebase before we can merge.

@vsavkin vsavkin force-pushed the shadowless_components_distributions branch 2 times, most recently from 048f74c to ffdab53 Compare August 24, 2014 20:17
@vsavkin
Copy link
Contributor Author

vsavkin commented Aug 25, 2014

@jbdeboer I've rebased the branch

@vsavkin vsavkin force-pushed the shadowless_components_distributions branch from ffdab53 to bef63ef Compare August 25, 2014 21:34
Some directives require access to the current view. Add the view field to the DirectiveInjector class, so it can be injected.
@vsavkin vsavkin force-pushed the shadowless_components_distributions branch 2 times, most recently from f155893 to b3b6db7 Compare August 26, 2014 14:55
…cluding components

Add implementations of the light dom and the content tag to support multiple insertion points for transcluding components.
@vsavkin vsavkin force-pushed the shadowless_components_distributions branch from b3b6db7 to e3689be Compare August 26, 2014 15:09
vsavkin added a commit that referenced this pull request Aug 26, 2014
…cluding components

Add implementations of the light dom and the content tag to support multiple insertion points for transcluding components.

Closes #1290
@vsavkin vsavkin closed this in 0d5c99e Aug 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

4 participants