ng-bootstrap-form-validation
ng-bootstrap-form-validation copied to clipboard
exportAs
Validating from code.
template
<form [formGroup]="deviceForm" #deviceFormRef="ngFormValidator">
.ts `@ViewChild('deviceFormRef') deviceFormRef: FormValidationDirective;
public onSubmit(): void { this.deviceFormRef.onSubmit(); }
`
Rather than ngFormValidator, should this be something like ngBootstrapFormValidator to be more namespaced to the package?
Thinking about this a bit more and feeling like the onSubmit handler shouldn't be callable by library consumers. Perhaps the code within that handler should be pulled out into a public method and the onSubmit handler should be private. Thoughts?