Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tagName attribute results in an extra wrapping element #5

Open
lolmaus opened this issue Jan 12, 2015 · 1 comment
Open

The tagName attribute results in an extra wrapping element #5

lolmaus opened this issue Jan 12, 2015 · 1 comment

Comments

@lolmaus
Copy link

lolmaus commented Jan 12, 2015

dynamic-component seems to be able to render required components without wrapping them in an extra element:

<div id="ember515" class="ember-view"> <!-- this is the component -->
  <p>Component content</p>
</div>

But when i pass tagName to dynamic component, e. g.

{{dynamic-component
  type=model.type
  tagName="section" }}

...then an extra wrapper appears:

<section class="ember-view"> <!-- this is extra wrapper -->
  <section id="ember515" class="ember-view"> <!-- this is the component -->
    <p>Component content</p>
  </section>
</section>
@rlivsey
Copy link
Member

rlivsey commented Jan 12, 2015

Thanks, I'll take a look asap.

The outer wrapper is the container view, which is a virtual metamorph by default. Adding the tagName is being passed to this in addition to the inner component and makes it show up in the DOM.

If you can upgrade to Ember canary then the new {{component}} helper there should also fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants