Actually I'm creating the form dynamically and i have done two way binding also. Now I want to do the validation.
Requirements:
- If i have value in field for (eg. Name: Raja). If edit that value using
$watchor$dirtywe can check that modified or not. The same thing I want to get reverse also. Suppose I edited the value Raja to Raj and later again i'm adding the 'a' means Raja. If i give previous value again the status$dirtyi should get false.
- If i have value in field for (eg. Name: Raja). If edit that value using
- How can do this thing for whole form rather than giving each and every field.
Please help me anyone on this.
Here is my Plunker for simple example.
directiveand use it on eachinputof your form.