Reputation:
How can I make edit button work in a data table in angular 7. I would also like to know how to load a component on button click,
Upvotes: 0
Views: 279
Reputation: 2591
Ok here is my idea to acheive it
First for a button to work we use (click)
<button (click)="toggledata()">Show</button>
<demo-component *ngIf="value"></demo-component>
.ts
value = false;
toggledata() {
this.value = !this.value;
}
Upvotes: 0