Dynamically set v-for with vue.js
<p>So I'm using Vue.js in my project, and I've got a problem: how could I bind filter for <code>v-for</code> dynamically? At some moment of time I'm passing the id of element to the vue method, how could I then put it into <code>v-for item in items | filterBy @{id} in 'id'</code>? </p>

<p>I've tried just putting '<code>v-for</code>' attribute by JQuery '<code>attr</code>', but this does not seem to work. I suppose that <code>Vue.filter</code> or <code>vm.$set</code> should be used here, but I can't figure anything out yet.</p>

<p>Would appreciate any possible help!</p>

<p>For example:</p>

<pre><code>var vm = new Vue({
  ...
  methods: {
    bindId: function(id) { //id is passed from html
      var repeat = 'item in items | filterBy "' + id + '" in "id"';
      $(#main).children('.collection').attr('v-for', repeat);
    }
  }
}
</code></pre>