无法绑定到“ngModel”,因为它不是“输入”的已知属性
<input>
zone.js:461 Unhandled Promise rejection: Template parse errors: Can't bind to 'ngModel' since it isn't a known property of 'input'. (" <div> <label>Created:</label> <input type="text" [ERROR ->][(ngModel)]="test" placeholder="foo" /> </div> </div>"): InterventionDetails@4:28 ; Zone: <root> ; Task: Promise.then ; Value:
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Intervention } from '../../model/intervention'; @Component({ selector: 'intervention-details', templateUrl: 'app/intervention/details/intervention.details.html', styleUrls: ['app/intervention/details/intervention.details.css'] }) export class InterventionDetails { @Input() intervention: Intervention; public test : string = "toto"; }
慕莱坞森
月关宝盒
相关分类