Reputation: 57
I have found a tutorial on how to work with the angular js, but when I try to implement it into my work, I do not get the same results. Here is the original:
And here is my work:
My code for some reason does not show the error labels/ messages and if it does, it shows it under the input field instead of besides it.
<div class="input-prepend">
<span class="add-on"><i class="icon-user"></i></span>
<input class="form-control" placeholder="Full name (Required)" data-ng-model="name" name="name" type="text" ng-minlength="3">
<span class="label label-danger" data-ng-show="submitted && helpForm.name.$error.required">Required!</span>
<span class="label label-danger" data-ng-show="submitted && helpForm.name.$error.minlength">Name too short!</span>
</div>
What can I do?
Upvotes: 1
Views: 90
Reputation: 1799
The css class "input-prepend" defines a font-size of 0 (zero!) pixel. Your error labels are children of a div with this class and have a font-size of 75%. This gives a font-size of 0*0.75=0 pixel. Pretty hard to read...
Upvotes: 1