Ritu Singh
Solution
The source of the issue is the other buttons that have type="submit" set on them. Upon clicking on them, the form will be submitted (the ngSubmit event will wait for it), and the function onSubmitAddRiskAssessment() will then become active.
Suggested blogs:
>How to make the dropdown for this button ADA accessible in Angular?
>How to update properties value with event in template Angular?
>Unit Test Angular Standalone Component, Overriding Provider not used
>How to Import componet's own module using Angular?
>Why component does not display variable of another component in Angular?
>What are the ways to pass parameters to Angular service?
>How to access variables in a function using Angular?
>How can I close a bootstrap modal using Angular?
>Fix: Strange compilation error with Typescript and Angular
>Uploading files and JSON data in the same request with Angular
>CRUD Operations In ASP.NET Core Using Entity Framework Core Code First with Angularjs