Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Web component with "is" attribute not rendered in the view. #2642

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

Closed
SANolaroads opened this issue Apr 8, 2016 · 5 comments
Closed

Web component with "is" attribute not rendered in the view. #2642

SANolaroads opened this issue Apr 8, 2016 · 5 comments

Comments

@SANolaroads
Copy link

Hi there!

First of all thanks for your work. I'm using Vue everyday, and it's great!

I just encountered however a problem when I tried to use a Web Component (with webcomponentjs polyfill) with the is attribute, inside a view. However, this component works perfectly when I use a custom tag. The problem with the custom tag approach, is that I can't extend default HTML elements anymore.

During my investigation, I noticed that Vue checks if the component is declared in the vm or not. But when the component is not declared, it's not rendered.

Is there a way to specify inside a view which component we would like to ignore during the evaluation of the template ?

@posva
Copy link
Member

posva commented Apr 8, 2016

Hi!

Please make sure to sure to ask the question on the forums or the gitter chat. You'll get faster feedback. We try to questions out of issues 😄

As for the question, I'm not sure I understand the point. Why would you ignore a component? Maybe you can use the v-pre directive http://vuejs.org/api/#v-pre

@posva posva closed this as completed Apr 8, 2016
@yyx990803
Copy link
Member

Adding v-pre to the element should solve the issue.

@SANolaroads
Copy link
Author

Thank you so much @posva and @yyx990803!! You made my day ^^

@SANolaroads
Copy link
Author

Wait, I forget to mention something... I also need to keep the other directives working. Since I extended an <input> element, I would like to use directives like v-model. But the v-pre disables everything.

@yyx990803
Copy link
Member

@SaidAhemtNolaroads that is indeed a problem - I've fixed it so that is attribute that doesn't resolve to a Vue component will be preserved.

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

3 participants