title: How to change border radius on click of the image in angular 6
body: <p>I have two Images. One is rectangle and another one is rounded corner Image. And one div is there. This div is a Square box. </p>
  
  <ol>
  <li>If I click the rectangle Image, the square box border radius is 0px.</li>
  <li>Same as if i click rounded corner, the square box border radius is 5px.</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>rectangle():void{
  document.getElementsByClassName('square')[0]["style"].borderRadius="0px";
  }
  roundedCorner():void{
  document.getElementsByClassName('square')[0]["style"].borderRadius="5px";
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.square{
  width:200px;
  height:100px;
  border:1px solid black;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;img (click)="rectangle()" src="rectangleImage"&gt;
  &lt;img (click)="roundedCorner()" src="roundedCornerImage"&gt;
  
  &lt;div class="square"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I tried this one. But it is not working for me. How can I do this in angular 2 or 4 or 5 or 6? Please help me anyone.</p>