I have this HTML template:
<input type="text"
ngModel
#myValue="ngModel"
name="{{ fieldName }}"
id="{{ fieldName }}"
value="{{ myVal }}"
class="form-control"
(change)="checkDirty(myValue)">
How do I check this field is dirty in my.component.ts file?
Now I have only this basic code in my.component.ts file:
export class UriFieldComponent implements OnInit {
constructor() { }
ngOnInit() { }
checkDirty(value) {
// in here I need to check is dirty or not
}
}