javascript - tooltip in angularjs for form validation -


I want to show tooltips next to the invalid and dirty input elements in a bootstrap model form in the angularjs application. I am not currently using angular-UI I tried to search and get an implementation related to writing a command.

Since we already use bootstrap and angulars, I was thinking that as the input field reaches an invalid and dirty state, what would be the best way to show tooltips. Perhaps something like this in your HTML (typical Bootstrap form structure):

     

& lt; Div class = "form-group" verification-tooltip & gt; & Lt; Label & gt; My label & lt; / Label & gt; & Lt; Input type = "text" ng-model = "myModel" name = "someName" data-toggle = "tooltip" data-placement = "true" title = "your tooltip text." Class = "form control" & gt; & Lt; / Div & gt;

Then type a command to stop formality using the event of your choice. In my example I have given a custom attribute on the form-group element, then in the link function (in your instructions) you want to get the required attribute like:

  var inputEl = element Find ('input [name]');    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -