问题描述
您好,每个使用向导步骤的操作员,我都有一个from and inside它,我有ngmodelgroup,我想先验证ngmodelgroup,然后再继续下一步,但我无法执行此操作,但它不起作用[disabled] =“!AgentproForm.clientgroup .valide” 我正在使用角度驱动形式
form#AgentproForm =“ ngForm” ngModelGroup =“ clientgroup”
我尝试过的事情:
<div class="container">
<form #AgentproForm="ngForm" (ngSubmit)="onSubmit(AgentproForm)">
<aw-wizard>
<aw-wizard-step [stepId]='0'awOptionalStep>
<h1>Information du client</h1>
<div ngModelGroup="clientgroup">
<div class="row justify-content-start">
<div class="col-md-6">
<div class="form-group">
<label for="name">Nom Complet</label>
<input type="text" id="Nom" class="form-control
[(ngModel)]="model.nom_complet" name="Nom"
#nom_complet="ngModel" [ngClass]="{ 'is-invalid':
nom_complet.touched && nom_complet.invalid }" required
/>
<div *ngIf="nom_complet.touched && nom_complet.invalid"
class="invalid-feedback">
<div *ngIf="nom_complet.errors.required">
Le Nom est obligatoire
</div>
</div>
</div>
<!- end col -->
</div>
<!-- end row -->
<ul class="list-inline wizard mb-0">
<li class="previous list-inline-item">
<button class="btn btn-primary" awPreviousStep type="button">
Previous
</button>
</li>
<li class="next list-inline-item float-right">
<button class="btn btn-primary" [awGoToStep]="{ stepId: 1 }"
(click)="afficherdepot()" type="button"
[disabled]="!AgentproForm.clientgroup.valid">
Stock
</button>
</li>
<li id="exbtn" class="next list-inline-item float-right"
style="margin-right: 32px;">
<button class="btn btn-primary" [awGoToStep]="{stepId: 2}"
type="button" [disabled]="!AgentproForm.clientgroup.valid">
Externe
</button>
</li>
</ul>
</div>
<!-- end of ngmodelgroup-->
</aw-wizard-step>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)