将ngModel绑定到输入时,我发现以下错误-
Can't bind to 'ngModel' since it isn't a known property of 'input'. ("<div>
<span> Select : </span>
<input type="radio" name="options" value="all" [ERROR ->][(ngModel)]="SelectRadioButtonValue" (change)="onRadioButtonSelectionChanged()" />
<span> {{"All: " "): ng:///AppModule/EmpCountComponent.html@2:47
Can't bind to 'ngModel' since it isn't a known property of 'input'. (">
<span> {{"male: " + '(' + male + ')' }} </span>
<input type="radio" name="options" value="female" [ERROR ->][(ngModel)]="SelectRadioButtonValue" (change)="onRadioButtonSelectionChanged()" />
<span> {{"Female"): ng:///AppModule/EmpCountComponent.html@6:50
答案 0 :(得分:0)
要使用.dialogTitle {
display: flex;
justify-content: space-between;
align-items: center;
}
,应将[(ngModel)]
导入您的FormsModule
:
AppModule