click button form submit angular cli 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>