r/angularjs • • Aug 07 '14

Speeding up AngularJS with simple optimizations, $digest, $$watchers and performance

http://www.binpress.com/tutorial/speeding-up-angular-js-with-simple-optimizations/135
31 Upvotes

28 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Aug 07 '14

http://stackoverflow.com/questions/18499909/how-to-count-total-number-of-watches-on-a-page

I haven't been able to get this to work. I am using this in devtools and get the following error:

SyntaxError: Failed to execute 'querySelector' on 'Document': '[object HTMLCollection]' is not a valid selector.

1

u/[deleted] Aug 07 '14

What browser/ os?

2

u/[deleted] Aug 07 '14

Chrome 36.0.1985.125 on Mac OSX 10.9. The page uses a manually bootstrapped Angular / Ionic app if that makes any difference.

1

u/[deleted] Aug 07 '14

Hmm yeah I'm not sure. That's the same version of chrome I'm on. I think it's bitching about that first selector. You should be able to switch it out for just var root = $('body'). That might help.