title: Angular 8 hide divs and show div on button click
body: <p>I am new to angular and having an issue with hide and show content.
  I have 3 buttons, button A, button B and button c. When i click on button A, the content of the button A ie div A should be visible,the content of button B ie div B and button C ie div C should hide like that.</p>
  
  <p>But i can display the respective divs when clicked on the respective buttons, but i am not able to hid the other two divs.</p>
  
  <p>Can any one help me out.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Please find below the code which i am trying out.</p>
  
  <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>previousWeekData(){
    console.log("Previous Button Clicked");
    this.isShow = !this.isShow; 
  }
  nextWeekData(){
    console.log("Next Button Clicked");
    this.isShow = !this.isShow;   
  }
  todaysWeekData(){
    console.log("Todays Button Clicked");
    this.isShow = !this.isShow;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
   &lt;div class="row"&gt;
                  &lt;div class="col-md-4"&gt;
                      &lt;div class="btn-group"&gt;
                          &lt;div class="btn btn-dark"  [(viewDate)]="viewDate" (click)="previousWeekData()"&gt;
                              Previous
                          &lt;/div&gt;
                          &lt;div class="btn btn-outline-secondary" (click)="todaysWeekData()"&gt;
                              Today
                          &lt;/div&gt;
                          &lt;div class="btn btn-dark"  [(viewDate)]="viewDate" (click)="nextWeekData()"&gt;
                              Next
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="row"&gt;
   &lt;div *ngIf = "isShow"&gt;Previous week datay.&lt;/div&gt;
              &lt;div *ngIf = "!isShow"&gt;Next week data.&lt;/div&gt;
              &lt;div *ngIf = "isShow"&gt;Current week data&lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>