I want to have that after clicking submit button it check if there is something written down in input form if not the ng-class change the span color to red . I want to have red color only after submittion not all the time , here is link :
<form name="myForm" validate class="form-horizontal">
<div class="control-group" >
<label ng-class="{bad: ( myForm.name.$invalid && myForm.name.$pristine ) }" >Name:</label>
<input type="text" name="name" placeholder="Name" ng-model="user.name" required/>
<span ng-show="isInvalid('name')" class="help-inline">Name is required</span>
<span ng-show="isValid('name')">Great!</span>
</div>
<button type="submit">SUB</button>
</form>