title: How to disable an input dynamically with Angular 7
body: <p>I'm trying to disable an input depending on the value taken from the Component.ts</p>
  
  <p>In my <code>component.ts</code> file I have this value</p>
  
  <pre><code>disName = false;
  </code></pre>
  
  <p>And in my HTML I have these elements</p>
  
  <pre><code>Name: &lt;input type="text"
               value="name"
               size="15"
               id="name"
               name="firstName"
               [(ngModel)]="aproverFirstName"
               [attr.disable]="disName=='true' ? true : null"&gt;
  </code></pre>
  
  <p>What looking for is that if my value on the <code>component.ts</code> is false, then in the html file the input element should change to disable depending on the value.</p>
  
  <p>I've also tried this <code>[disable]="disName"</code></p>
  
  <p>I'm using Angular 7, thanks a lot!</p>