NetanelBasal
1/10/2017 - 2:15 PM

form1.html

<input type="text" name="firstName" ngModel required minlength="2" />
<control-errors control="firstName" 
                [errors]="{required: 'First name is required', 
                           minlength: 'minlength error'}"></control-errors>

<input type="text" name="lastName" ngModel required minlength="2" />
<control-errors control="lastName" 
                [errors]="{required: 'Last name is required', 
                           minlength: 'minlength error'}"></control-errors>