angular4的新手再次陷入了新的情景。我有一个表单和内部,我写了一个对话框内容,如下所示:
<form #f="ngForm" (ngSubmit)="onCloseConfirm(f.value)">
<md-dialog-content>
<md-grid-list cols="12" rowHeight="70px">
<md-grid-tile [colspan]="6" [rowspan]="1">
<md-input-container>
<input mdInput placeholder="App Name" value="{{ data.appName }}">
</md-input-container>
</md-grid-tile>
<md-grid-tile [colspan]="6" [rowspan]="1">
<md-input-container>
<input mdInput placeholder="App ID" value="{{ data.appID }} ">
</md-input-container>
</md-grid-tile>
<md-grid-tile [colspan]="6" [rowspan]="1">
<md-input-container>
<input mdInput ngModel required name="customer"
#customer="ngModel" placeholder="Customer" >
</md-input-container>
</md-grid-tile>
</md-grid-list>
</md-dialog-content>
</form>
<md-dialog-actions>
<button md-raised-button type="submit" class="saveBTN" >Save</button>
</md-dialog-actions>
问题是当我点击保存时,它应该显示红色所需的字段,这不会发生。任何人都可以帮助我。