title: Hide and show on same button angular 2
body: <p>I'm trying to create a layout with hide/show element when ever clicked on the same button. The reason I am doing this in my page I have lots of buttons and for minimizing the page I am giving an option in the right side slider to choose only the functions they want to use. </p>
  
  <p>example:</p>
  
  <pre><code>In the right slider layout i have the below code
  &lt;div class="col-md-6"&gt;
  &lt;div class="form-group"&gt;
  &lt;button class="btn cyan" dnd-draggable [dragEnabled]="true" (click)="cam1=1;"&gt;CAM 01&lt;/button&gt;
  &lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>when someone clicked on the button my main page should hide or show the cam 01 button. </p>
  
  <pre><code>This is my main page code
  &lt;div class="col-md-12"&gt;
  &lt;div class="col-md-2"&gt;
  &lt;div class="form-group"&gt;
  &lt;button class="btn" name="0x10000001"  (click)="mcxAppService.sendNotify($event)" id="0x10000001" value=1 *ngIf="cam1==1"&gt;CAM 01&lt;/button&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>With the above code, I'm able to show on click.</p>