v-for doesn't support String #4497

Closed
fenivana opened this Issue Dec 16, 2016 · 1 comment

Projects

None yet

2 participants

@fenivana
fenivana commented Dec 16, 2016 edited

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
Member
posva commented Dec 16, 2016

Nice catch, I'll add it

@posva posva added a commit to posva/vue that referenced this issue Dec 16, 2016
@posva posva Add missing string handler in v-for
Fix #4497
3aefb24
@posva posva added a commit to posva/vue that referenced this issue Dec 16, 2016
@posva posva Add missing string handler in v-for
Fix #4497
4d29299
@yyx990803 yyx990803 closed this in #4499 Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment