title: DOMException: String contains an invalid character
body: <p>When I add [(ngModel)] in code I get this error:</p>
  
  <blockquote>
    <p>DOMException: String contains an invalid character</p>
  </blockquote>
  
  <p>The component file:</p>
  
  <pre><code>const keyInput = document.createElement('input');
  keyInput.setAttribute('class', 'form-control input-transparent');
  keyInput.setAttribute('type', 'text');
  keyInput.setAttribute('[(ngModel)]', trans.key);
  keyInput.setAttribute('name', 'keys[]');
  keyInput.setAttribute('value', trans.key);
  </code></pre>
  
  <p>Can anyone help me with this issue?</p>