How to conditionally require form inputs in angular 4?
问题 I am using template driven forms for adding the task, and there are 2 input fields of type number for estimated mins to complete task, one field is for estimated number of hrs and another is for estimated minutes to complete the task since the task estimate can be done either in hours like 1hrs , or in hours and minutes like 1Hrs 30Mins , so i want to set attribute required to inputs conditionally. So one of the 2 inputs must be set or form validation error will occur if both inputs are empty