Hacker News new | past | comments | ask | show | jobs | submit login

It's better because you get nice stuff like two way binding which your js won't give you. Also, building templates in html is definitely nicer and more expressive than doing it in js. That specific example doesn't look great - but it's probably not the best way of doing it either.

On the performance - it's going to be slower than doing everything in specifically optimised code, but it's almost certainly not going to be a problem. My project has a million+ objects in js once the interface loads and I have watches on a big chunk of that data and the interface is still snappy. Granted, there are bits where I have to be careful to make it snappy, but that's life. Development time is so much faster I wouldn't make the tradeoff for the world now.




> two way binding

Other frameworks also provide two way binding.

> better than in JS

Handlebars is much more like 'programming _with_ HTML' than 'programming in JS'


He didn't mention other frameworks - but how JS doesn't give you two-way bindings. Which it doesn't. Your second point is about Handlebars, which isn't even mentioned in the comment you replied to.


My parent suggests two way binding requires manually annotating the DOM, implying that it's an Angular-exclusive feature.

Furthermore, those who don't like annotation aren't writing JavaScript views, they're writing HTML templates and annotating them with some JS, which means the parent offers a false dichotomy.


Incorrect. I was saying that the joke example presented didn't in anyway show the difference in power that Angular gives you over raw js - nothing at all about Angular exclusivity.


Word. I think we can all agree that EVERY framework is far better than plain old JS; the comparison is so nonsensical to me that I assumed you couldn't possibly be making it. Seems good!


No, that wasn't implied. He's just saying that's what it's there for in this example.


I guess we just read it differently, then.


We did, and he just corrected you, so there's that.


PLONK




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: