filmov
tv
javascript - Can't bind to 'ngModel' since it isn't a known property of 'input'
![preview_player](https://i.ytimg.com/vi/SdgJmbOdfuw/maxresdefault.jpg)
Показать описание
I have this simple input in my component which uses [(ngModel)] :
input type="text" [(ngModel)]="test" placeholder="foo" /
And I get the following error when I launch my app, even if the component is not displayed.
Can't bind to 'ngModel' since it isn't a known property of 'input'.
import { Intervention } from '../../model/intervention';
@Component({
selector: 'intervention-details',
})
export class InterventionDetails
{
@Input() intervention: Intervention;
public test : string = "toto";
}
input type="text" [(ngModel)]="test" placeholder="foo" /
And I get the following error when I launch my app, even if the component is not displayed.
Can't bind to 'ngModel' since it isn't a known property of 'input'.
import { Intervention } from '../../model/intervention';
@Component({
selector: 'intervention-details',
})
export class InterventionDetails
{
@Input() intervention: Intervention;
public test : string = "toto";
}