title: How to set a value to html attribute on a if condition in angular
body: <p>In this case i have to check a value of a variable (returning value of a function) and create a "aria-label" attribute and set a value to it.</p>
  
  <p>Here i'm not just going to set a value for the attribute. I need to create a attribute based on a if condition. Something like "ng-if"</p>
  
  <ul>
  <li>If the value is true : Create the attribute and set the value.</li>
  <li><p>If the value is false : No need to create the attribute.</p>
  
  <pre><code>&lt;li  ng-aria-label="{'selected':tab.isSet($index+1)}"/&gt;
  </code></pre></li>
  </ul>
  
  <p>This is how i have done it and it's not working. After the page is rendered there isn't a attribute as a "aria-label='selected'".</p>
  
  <p>Thanks in advance. </p>