Open sidebar
$.each(errors, function(key, value){ if(key == 'email') { error['email'] = value; $scope.errorbox1 = true; } else { $scope.errorbox1 = false; } if(key == 'first_name') { error['first_name'] = value; $scope.errorbox2 = true; } else { $scope.errorbox2 = false; } if(key == 'last_name') { error['last_name'] = value; $scope.errorbox3 = true; } else { $scope.errorbox3 = false; } }); $scope.errors = error; //////////////////////////////VIEW/////////////////////////////// <input type="text" ng-model="user.email" ng-class="{errorbox:errorbox1}" class="form-control" id="title" placeholder="User email"/> <input type="text" ng-model="user.first_name" ng-class="{errorbox:errorbox2}" class="form-control" id="year" placeholder="User name"/> <input type="text" ng-model="user.last_name" ng-class="{errorbox:errorbox3}" class="form-control" id="year" placeholder="User name"/>
Close sidebar
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
X (fomerly Twitter)
GitHub
Use setting