angular - Angular2 Custom Component - mark as pristine and untouched -
i have template driven form in angular 2.1 containing many standard controls ( <input>, <select> etc) , custom control contains multiple input elements. i've implemented controlvalueaccessor on custom control , propagating it's changed/touched/valid values correctly parent form. however .. on parent form have save button, on after saving want clear dirty/touched state (as affects css applied) this: save(myform: ngform) { myform.form.markaspristine(); myform.form.markasuntouched(); } this working ok elements in top level parent form , custom control but <input> fields within custom control still marked touched/dirty (and receiving pre-saved styling). is there way custom control can notified when it's dirty/touched state changed can clear it's child <input> elements match? seems if <input> elements within custom control don't updated calls markaspristine/untouched on parent form. thanks! try add con