Cannot use
ngControl.control.errors?.required
or get Property 'required' comes from an index signature, so it must be accessed with ['required']
. When i use ngControl.control.errors['required']
then i get into object possibly null
error. How can i get over this one?