This repository has been archived on 2020-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
angularjs-batarang/FAQ.md
2013-01-01 11:31:33 -05:00

429 B

Batarang FAQ

How do I measure a directive's performance?

If your directive uses $watch, you should be able to see the watch expression wherever your directive is used.

My $watch functions show up as just "function ()" in the performance tab

Use named functions for $watch:

scope.$watch(function checkIfSomethingChanged() { 
  // ...
}, function whenThatChanges(newValue, oldValue) {
  // ...
});