So, I'm looking to use ui.bootstrap.tooltip
to appear when an element in a form is invalid.
I'm using a directive to do this - it's a bit ugly, but it works. Except for one thing - the controller isn't seeing the updated model values due to another scope being created in the directive.
I can get the model value through the form and using $viewValue
, but this seems a bit "unclean" to me.
Also, is there a better way to get the "tooltip element", that I'm using elem.parent().children()[2];
for? I suppose I could create a <template>
in the directive for all this.
The JSFiddle is at: http://jsfiddle.net/n8vNw/2/