Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am using Bootstrap UI in my angular application. I have a tooltip in the html page which works fine. I noticed that after the tooltip is displayed and I move my mouse out, the Ui-bootstrap-tpls.js fires a method called "hideTooltipBind" which in turn calls $apply and it triggers the filters in that scope to reload.

Lets say I have 10 filters in the scope which is filtering an array of 100 each. Everytime a tooltip is displayed, all my filters are forced to reload again. How can I avoid this? I am using

//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js
jquery-2.0.3.js
ui-bootstrap-tpls-0.11.0.js

I have attached the screenshot of the Call Stack

enter image description here

share|improve this question
    
The tooltip directive actually creates a separate scope for the tooltip. Are you sure it causes your whole scope to be digested? –  Oliver Salzburg Jun 23 at 22:04
    
Yes,It triggers all watches and filter re-evaluation. –  Gokul Jun 24 at 14:44
1  
This is the response I got from the Bootstrap UI team "This is how AngularJS works - any call to $scope.$apply will trigger all watches and filter re-evaluation. This has nothing to do with tooltips - you will see the same behavior when, for example, entering text into an input field." –  Gokul Jun 24 at 14:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.