how to show data from a button click angular code example
Example: click on button submitting the form in angular
// type button required otherwise it will submit the form
<button type="button" (click)="preview();">Preview</button>
// type button required otherwise it will submit the form
<button type="button" (click)="preview();">Preview</button>