0 votes
in Angular by

If your form model includes a has.valid property on it, what code can be added in the submit button to disable the submit button when the form does not pass validation?

1. <button type="submit" [{disabled}]="form.valid">Save</button>
2. <button type='submit' [disabled]='!form.valid'>Save</button>
3. <button type="submit" [disabled]="!form.valid">Save</button>
4. <button type='submit' [disabled]=[!form.valid]>Save</button>

1 Answer

0 votes
by
Correct answer is :- <button type="submit" [disabled]="!form.valid">Save</button>
...