Hacker News new | ask | show | jobs
by debacle 4199 days ago
I don't understand. The comparison breaks down in the very first example - where is the example of Angular's excellent DOM abstraction and compatibility magic?

"And then I refactored something that was bad to make it faster."

There's also a typo in the jQuery example.

There's no comparison. jQuery provides way more for actual DOM magic than Angular does.

> As I have outlined in this article, AngularJS can do everything that jQuery does and much more...

But you didn't. You didn't even provide an Angular implementation of your very first example.

3 comments

Agreed 100%. This would be hugely helpful for me (and others I hope): I get where Angular shines (heavy-lifting for single-page apps). The part I'm missing is how to do the day-to-day jQuery stuff in Angular. Change CSS classes on button clicks. Hide & show elements on drop-down changes. Etc.

In my mind, Angular is still "for building a rich app", whereas jQuery is "for adding a bit of magic to an otherwise static page" (I know that's not really true, but it's what I use it for.)

I'd love to get fluency in Angular - or at least a great understanding of it - for that latter case. Is it usable for the day-to-day "magic" bits of an otherwise normal webpage? (Other than the 2-way data binding example which I see all the time and understand).

These articles are essentially clickbait. The Angular docs themselves say "this is not a low-level framework, if you need that, use something such as jQuery"!
I was puzzled by this too. I'm not familiar with Angular, but am of course curious. My side project uses a fair bit of Jquery, but I wonder if some things would be better served in other ways.