title: Assign a value to a variable in the template - Angular7
body: <p>There are toggle two button (edit and submit), which button should work like toggle show/hide style on click</p>
  
  <pre><code>&lt;button (click)="showEditBtn = false;" *ngIf="showEditBtn;"&gt; Edit&lt;/button&gt;
  &lt;button (click)="showEditBtn =  true;" *ngIf="!showEditBtn;"&gt;Submit&lt;/button&gt; 
  </code></pre>
  
  <p>I need  <code>showEditBtn</code> variable should be <code>true</code> in default without touching <strong>script</strong> file</p>
  
  <p>Is it possible to assign a value to a variable in the template, like below example?</p>
  
  <pre><code>&lt;div&gt; {{  let showEditBtn = true  }}  &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://stackblitz.com/edit/angular-lvpf5a" rel="nofollow noreferrer">stackblitz example</a></p>