Toggle Button in Angular 13

app.component.html: 

  <button (click)="toggle()">Toggle</button>
  <h1 *ngIf="display">Toggle Button Content</h1>


app.component.ts:


display=true;
toggle()
{
this.display=!this.display;
}




Comments

Popular posts from this blog

Send Data Child to Parent Component - React Js

Hide , Show and Toggle in ReactJs

Importance Of Web Content In SEO.