问题描述
提交表单时,我想重置表单。我可以使用form.resetForm();
重设表单,但是如何自动将切换回滑动?
<mat-form-field appearance="outline">
<mat-label>Name</mat-label>
<input name="name" #name="ngModel" [(ngModel)]="settingsService.formData.name" matInput placeholder="Full Name" />
</mat-form-field>
<mat-slide-toggle (click)="changePrivacy()">Show to the public</mat-slide-toggle>
<div class="button-row">
<button mat-raised-button color="primary" type="submit">Submit</button>
<button mat-raised-button color="warn">Clear</button>
</div> ```
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)