title: Angular: disable and enable button
body: <p>I want when the <strong>up</strong> button is disable by pressing <strong>fix</strong> it will be enable
  To make the up disable I have to double click it,
  The fix button does not work, I do not know how to sync between the 2 buttons,
  If I press fix I want the count to be reset to 0 and the up button to enable again.</p>
  <p><a href="https://stackblitz.com/edit/angular-ivy-ult3z7?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts,src%2Fapp%2Felevator.service.ts,src%2Fapp%2Fapp.module.ts" rel="nofollow noreferrer">link for my code in stackblitz</a></p>
  <p>My service:</p>
  <pre><code>  export class ElevatorService {
    Count = 0;
  
    constructor() {}
  
    breakDown() {
      this.Count++;
      if (this.Count &gt;= 2) return true;
      return false;
    }
  }
  </code></pre>
  <p>My component.ts:</p>
  <pre><code>export class AppComponent {
    count = 0;
    buttonsDisabled = false;
    constructor(private elevatorService: ElevatorService) {}
  
    ngOnInit(): void {
      this.count++;
    }
  
    up() {
      this.buttonsDisabled = this.elevatorService.breakDown();
    }
  
    Fix() {
      return (this.count = 0);
    }
  }
  </code></pre>
  <p>My component.html:</p>
  <pre><code>&lt;input type=&quot;button&quot; value=&quot;Up&quot; (click)=&quot;up()&quot; [disabled]=&quot;buttonsDisabled&quot;&gt;
  
  &lt;input type=&quot;button&quot; value=&quot;Fix&quot; (click)=&quot;Fix()&quot; &gt;
  </code></pre>