I am trying to change custom class on model change for angular ui tooltip.
This is what I am trying to achieve
- if nothing is entered in text box, (when I focus) then it should show default tooltip as "required"
- if I write something (that changes model's value), so it should change the tooltip text with new
customClass
With my current implementation, it changes text but customClass
gets applied only when I blur and focus again on text box.
I understand when it re-render the tooltip, it picks up new value of model and apply customClass
but in this case, how can I call tooltip's recreate method to re-render it on model change?
here is the code http://plnkr.co/edit/Q4j2372DOcQkrL3Dv0bi?p=preview