My code is the following :
<ng-form name="invitationForm">
<div ng-repeat="email in emails" ng-form='lineForm'>
<div class="has-feedback" ng-class="{'has-error': lineForm.$invalid && lineForm.input, 'has-success': lineForm.input && !lineForm.$invalid}">
<label class="control-label sr-only" for="inputSuccess">Input with success</label>
<input ng-change="inputCheck($index)" id="inputSuccess" placeholder="Enter your friend's email" name="input" ng-model="email.value" class="form-control input-mini" aria-describedby="inputSuccessStatus" type="email" />
</div>
</div>
</ng-form>
What I want to do is have the div with class "has-feedback" have class "has-error" when the lineForm is invalid and the input is not empty. I put the condition lineform.$invalid && lineForm.input but lineForm.input doesn't seem to be working. I also tried lineForm.input.length to no avail.
Thanks