title: Angular 9 change the attribute value of an element
body: <p>I am trying to change the attribute value of an element but the new value is not set in the element</p>
  <p>Any Best standard practise of Angular through which we can achieve the below problem</p>
  <pre><code> &lt;div name=&quot;hai&quot;  (click)=test($event)  #ckechName&gt;
  </code></pre>
  <p>in Ts file</p>
  <pre><code>test(event){
  
  let exmpl=event.currentTarget
  exmpl.getAttribute('name')  //I am able to retrieve this valu as hai
  
  exmp.setAttribute('name','hello')  //This is value is not setting as hello in the dom..It is still showing hai
  </code></pre>
  <p>}</p>