taggit Summary
So far our new component is ready to integrate with Angular forms API, however, one more step is still necessary to allow forms API to recognize our component as a valid form control and interact with it (this interaction is possible because we implemented interface in the previous step). Before we start let’s take a look at the source code of Angular official which is responsible for linking our component with the form, and try to understand how this directive builds this link, by looking at the constructor of that directive we find the following:this means that if we wanted to recognize our component and interact with it, we need to provide our component using the injection token and to do so we just need to update the options of the Component decorator to be as the following:Now our component is ready to be used in any template or model-driven form, we can use it for an example in our as the following: