[英]How to keep submit button disable until form data did not filled with reactive validation?
You could just use the FormGroup object you created "registerForm". 您可以只使用您创建的“ registerForm” FormGroup对象。 This object is really powerful. 这个对象真的很强大。 Check out the documentation on it. 查看有关文档。
https://angular.io/api/forms/FormGroup https://angular.io/api/forms/FormGroup
I do this all the time :) 我一直在做这个:)
<button [disabled]="!registerForm.valid" class="btn btn-primary">Register</button>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.