我正在使用角度6,我想使用ngModel:
for k=1:size(F,3)
H= squeeze(F(:,:,k));
[U,Sigma,V]= svd(H);
V= V(:,1:n);
Y(:,k) = H * V* s;
end
所以我得到这个错误:
<input type="text" [(ngModel)]="textValue">
我尝试将表单模块添加到我的login.module.ts 但我收到webpack错误:
Can't bind to 'ngModel' since it isn't a known property of 'input'
我的依赖项是:
Cannot read property 'call' of undefined
TypeError: Cannot read property 'call' of undefined
如何使mgModel在Angular 6上运行?
答案 0 :(得分:2)
请在您的app.module.ts
中添加以下内容:
import { FormsModule } from '@angular/forms';
@NgModule({
imports: [FormsModule]
})
如果您未包含在@NgModule中,则会出现上述错误