I am currently dealing with a frustrating issue caused by the following code
<input type="text" ng-class="GLOBAL_ERROR == 1 ? 'error-branch' : 'defaulttxt'" ng-model="frm.FirstName" name="FN" ng-required="true" ng-minlength="2" ng-maxlength="100"/>
Upon page load, the form is invalid and thus has the class error-branch
. However, after data is loaded, the class remains as error-branch
.
How can I resolve this? Should I implement something like the following?
$scope.$on('$viewContentLoaded', function(){
});