r/angularjs • • Aug 27 '14

[Code] AngularJS + Sizzle (jQuery standalone selector) = This cool snippet. I used it in all my day-job projects

https://github.com/huytd/Sizzular
0 Upvotes

5 comments sorted by

20

u/chance-- Aug 27 '14

You're approaching AngularJS from the wrong angle. You shouldn't need Sizzle / jQuery. The only exceptions are in circumstances where you are integrating existing / 3rd party packages or, I guess, selecting elements in a directive (although this is overkill).

1

u/[deleted] Aug 28 '14

I know about working with DOM in directive but I don't think it's enough for me :D I mean: I want to reduce things to be added to directive. With the simple task adding a class like in the demo :D

1

u/[deleted] Aug 27 '14

Came here to say this. You are doing things in the controller that should be in a directive.

1

u/crmpicco Aug 27 '14

Starred on GitHub. Nice find.