How to add required asterisk in a custom control?
How to add required asterisk in a custom control? I'm using angular 6 to create a custom component which contains a custom form control. So far, I've implemented ControlValueAccessor in my component. ControlValueAccessor My custom control is a simple MatSelect component from Angular Material. I want to show the asterisk ( * ) for when that control is required. MatSelect * So far, I've got the custom control to work, but adding the required attribute to the component doesn't add the asterisk to my control! required <app-provinces formControlName="projectProvince" required></app-provinces> Should I define an @Input variable for it and handle it manually, or should it be done automatically? @Input I'm confused. Why would an asterisk magically appear where you want it to appear if you have not added any code in your component to do that? – JB Nizet Jul 1 at 10:19 ...