我有这个 HTML 模板:
<input type="text"
ngModel
#myValue="ngModel"
name="{{ fieldName }}"
id="{{ fieldName }}"
value="{{ myVal }}"
class="form-control"
(change)="checkDirty(myValue)">
如何检查 my.component.ts 文件中的此字段是否脏?
现在我在 my.component.ts 文件中只有这个基本代码:
export class UriFieldComponent implements OnInit {
constructor() { }
ngOnInit() { }
checkDirty(value) {
// in here I need to check is dirty or not
}
}