title: Vue2: v-model does not support dynamic input types
body: <p>When trying to create dynamic input elements i get an template compiling error like this:</p>
  
  <blockquote>
    <p>v-model does not support dynamic input types. Use v-if branches
    instead.</p>
  </blockquote>
  
  <p><a href="https://jsfiddle.net/u8ncfdvn/" rel="nofollow noreferrer">https://jsfiddle.net/u8ncfdvn/</a></p>
  
  <p>HTML </p>
  
  <pre><code>&lt;div id="app"&gt;
    &lt;sr-el :persons="personsFoo" name="foo" type="number"&gt;&lt;/sr-el&gt;
    &lt;br&gt;
    &lt;sr-el :persons="personsBar" name="bar" type="text"&gt;&lt;/sr-el&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>Vue.component('sr-el', {
    template: `
      &lt;span&gt;
        &lt;input :type="type" :name="name" :id="name" v-model="inputVal" :class="{invalid: !persons}"&gt;
        Here's the bound {{ name }} input value: {{ inputVal }}
      &lt;/span&gt;
    `,
    props: ['type', 'name', 'persons'],
    data() {
      return {
        inputVal: this.persons,
      }
    }
  })
  
  new Vue({
      el: '#app',
    data() {
      return {
        personsFoo: 1,
        personsBar: 2,
      }
    }
  })
  </code></pre>