Technofunnel presents another article on how to create Custom Attribute Directives in Angular. These directives are just like any other attribute like “id”, “class” and “name” that can be attached to an element. Once the directive is applied over an element, the functionality in the directive is applied to it.
In the above example, we will be creating a custom attribute directive that will update the color of the component to “green”. We will name this custom attribute “applyColor”.