title: Disable a button in angular depending on value of property of object inside an array?
body: <p>I have an array of object:</p>
  
  <pre><code>keyDisabledArray=[
    {'a':false},
    {'b':true}
  ]
  </code></pre>
  
  <p>and some buttons</p>
  
  <pre><code>&lt;button class="key" (click)="keyPressed('a')" id="a"&gt;A&lt;/button&gt;
  &lt;button class="key" (click)="keyPressed('b')" id="b"&gt;B&lt;/button&gt;
  </code></pre>
  
  <p>that must be disabled according to the content of keyDisabledArray. In this case, button 'b' must be disabled and 'a' enabled. I'm trying to use [disabled] but I'm not sure how to access the correct value in the array of objects.</p>
  
  <p>EDIT: I found some ways to access the value, but all were asynchronous or demanding a full loop on the array to find the correct element, and in both cases, I see problems: how angular deal with asynchronous code in front end (?) and if it is possible to avoid a full loop on the array for every button.</p>