globalDisableCountDown: use ng-if instead of ng-hide to avoid DOM update every second
sheymann opened this issue · 3 comments
sheymann commented
Using growlProvider.globalDisableCountDown(true);
the HTML markup is still inserted in the DOM:
<button type="button" class="close ng-binding ng-hide" aria-hidden="true" ng-show="showCountDown(message)">
39
</button>
and the timer is updated every second. As a consequence the DOM is updated every second as well, which hurts performance.
flippinjoe commented
Definitely agree. Great find. I'll get this one in asap
flaviocysne commented
This is a minor change to the angular-growl-2 template. You can create your own template, similar to the default one, and change ng-show
to ng-if
.
I submitted a pull request to change it. Vote for it.
blitzmann commented
If I understand correctly, this issue has been resolved by the pull requests, correct? Can we close it?