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

<button> issue inside component #3896

Closed
shohaxx opened this issue Oct 10, 2016 · 5 comments
Closed

<button> issue inside component #3896

shohaxx opened this issue Oct 10, 2016 · 5 comments

Comments

@shohaxx
Copy link

shohaxx commented Oct 10, 2016

Vue.js version

2.0.1

Reproduction Link

https://jsfiddle.net/3babq604/3/

Steps to reproduce

What is Expected?

What is actually happening?

do not shows button element in browser chrome 53.0.2785.143 m

@marceloadsj
Copy link

marceloadsj commented Oct 10, 2016

Your template must have only one root element.

<template id="counter-template">
  <div>
    <h4>counter</h4>
    <button>xxxxxxx</button>
  </div>
</template>

@marceloadsj
Copy link

marceloadsj commented Oct 10, 2016

Or, if you want "one or another" (h4 or button), the dev branch already have this feature.

<template id="counter-template">
  <h4 v-if="yourCondition">counter</h4>
  <button v-else>xxxxxxx</button>`
</template>

#3887

:)

@shohaxx
Copy link
Author

shohaxx commented Oct 10, 2016

@marceloLiberton but why it works on Internet explorer 11 ?

@rajibahmed
Copy link

rajibahmed commented Oct 10, 2016

This is not a bug ! You need a root element for your template ( vue2 works like reactjs)

Without the root component it can not render it properly.

<template id="counter-template">
  <div>
  <h4>counter</h4>
  <button>xxxxxxx</button>
  </div>
</template>

If you see anything is not working try the forum, docs first ...

If it is working on IE 11 maybe, IE is buggy.

//Best

@rekateka
Copy link

Hi @Abdulkhamidov, as @marceloLiberton and @rajibahmed mentioned, this is because you have a fragment instance which is unsupported as of 2.0.

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

5 participants