Angular actually gives you a reference to function in the registerOnTouched() callback. That function is wired up internally by Angular such that If we call the function, Angular will mark the form control as touched.
Really helpful tutorial Adithya. I gotta write one of these at work today and your tut very easy to understand!
Joe Smith
Hi. Great article. i was just wondering for the following " this.onTouched(); // <-- mark as touched this.selected = code; this.onChanged(code); // <-- call function to let know of a change "
why does calling this.onTouched(); mark it as touched. is it not an empty function?