title: Angular using ngModel in isolation set error
body: <p>I'm using <code>ngModel</code> without a form in isolation.  Its something like the following</p>
  <pre class="lang-html prettyprint-override"><code>&lt;input type=&quot;text&quot; [(ngModel)]=&quot;cusName&quot; #cusName=&quot;ngModel&quot; (change)=&quot;validate(cusName)&quot; /&gt;
  </code></pre>
  <p>In the <code>.ts</code> file I do some backend validation on the <code>change</code> event.  If there is an error I want to set the error in the <code>cusName</code> ngModel passed into the <code>validate</code> method.  I tried to do <code>custName.errors = {}</code> in the <code>.ts</code> file,  but then I get an error saying cannot set value.  My ideal scenario is that I want to set the <code>valid</code> property of the <code>cusName</code> ngModel to false and set a custom error on it as well through the <code>errors</code> property.  I can of course introduce additional variables into the model and extend it, but I prefer not to do that.</p>