title: How to create a boolean template variable in angular 2?
body: <p>I want to show or hide a section by click of a button. I don't want to create a variable in the controller. Is there a way to do this by using local template variables (using <code>#variableName</code>)?</p>
  
  <p>I am thinking something like below.
  But for this I am getting <code>template parse error</code>.</p>
  
  <pre><code>  &lt;button color="primary" #showSection1="true" (click)="!showSection1;"&gt;Toggle&lt;/button&gt;
    &lt;p *ngIf="showSection1"&gt;
      This should be shown or hidden on click of the button.
    &lt;/p&gt;
  </code></pre>