title: How to set attributes to an element in angular on clicking?
body: <p>I am new to angular and need help from you guys for my below requirement:</p>
  <p>I have two anchor elements with the click event attached to both. What I want to do is that on clicking this anchor element, I want to set the attribute value of <strong>data-wizard-state</strong> to <strong>current</strong> and remove from the other anchor element.</p>
  <pre><code> &lt;a
          class=&quot;wizard-step&quot;
          href=&quot;javascript:;&quot;
          data-wizard-type=&quot;step&quot;
          [attr.data-wizard-state]=&quot;tabClass&quot;
          (click)=&quot;showtabcontent()&quot;
        &gt;Link 1&lt;/a&gt;
  
   &lt;a
              class=&quot;wizard-step&quot;
              href=&quot;javascript:;&quot;
              data-wizard-type=&quot;step&quot;
              [attr.data-wizard-state]=&quot;tabClass&quot;
              (click)=&quot;showtabcontent()&quot;
            &gt;Link 2&lt;/a&gt;
  </code></pre>
  <p><strong>TS code:</strong></p>
  <pre><code> showtabcontent() {
  this.tabClass='current';}
  </code></pre>