angular中表单校验

适用于点击保存前的所有表单元素的校验 HTML angular文档中@viewchild() TS(这里用到了把整个表单当成子组件的方式) @ViewChild('stationForm') stationForm: NgForm; //表单校验 formValidate(): boolean { let controls = this.stationForm.controls;
相关文章
相关标签/搜索