I am new with angularjs. Trying to implement form validation using bootstrap tooltip. Text with tooltip will come up if input field is invalid and gets the focus. Validation is working fine, i.e. the input field gets red if it has invalid value but the tooltip text is not showing. Here is html:
<form role="form" name="form" ng-controller="registerController"> <div class="col-sm-12"> <div class="form-group" ng-class="{ 'has-error': form.fullName.$invalid && form.fullName.$touched}"> <input class="form-control has-feedback" name="fullName" id="fullName" type="text" required ng-model="fullName" tooltip="{{form.fullName.$valid ? '' : 'Full name required'}}" tooltip-trigger="focus" tooltip-placement="top" /> <span class="glyphicon glyphicon-ok-sign text-success form-control-feedback" aria-hidden="true" ng-show="form.fullName.$valid"></span> </div> </div> </form>
for the extra info,I have included following scripts and css files:
<script src="../scripts/jquery-2.2.1.min.js"></script> <link href="../Content/bootstrap.min.css" rel="stylesheet" /> <script src="../scripts/bootstrap.min.js"></script> <script src="../scripts/angular.min.js"></script> <script src="../scripts/angular-ui/ui-bootstrap-tpls.min.js"></script>
Help me to figure out how can I make it working. Thanks in advance.