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

v-for doesn't support String #4497

Closed
jiangfengming opened this issue Dec 16, 2016 · 1 comment
Closed

v-for doesn't support String #4497

jiangfengming opened this issue Dec 16, 2016 · 1 comment
Assignees

Comments

@jiangfengming
Copy link

jiangfengming commented Dec 16, 2016

Per the doc ( https://vuejs.org/v2/api/#v-for ), string iteration is supported, but I think it hasn't been implemented ( https://github.com/vuejs/vue/blob/dev/src/core/instance/render.js#L176 )

JSFiddle: http://jsfiddle.net/fenivana/5sH6A/969/

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
  </head>

  <body>
    <div id="app">
       hello <span v-for="v in foo">{{v}}</span>
    </div>

    <script>
    new Vue({
      data: {
        foo: 'foo'
      },

      el: '#app'
    })
    </script>
  </body>
</html>
@posva posva self-assigned this Dec 16, 2016
@posva
Copy link
Member

posva commented Dec 16, 2016

Nice catch, I'll add it

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

No branches or pull requests

2 participants