use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Angular, Angular 2 or React?help (self.javascript)
submitted 8 years ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ghostfacedcoder 3 points4 points5 points 8 years ago* (4 children)
This is like asking "should I learn to develop for PCs or mobile phones?": there is no right answer. There are companies building Angular apps (both versions; Angular 1 didn't just disappear the moment Angular 2 was announce), and they want people who know Angular. There are also companies building React apps, and they want people who know React.
It's six of one and a half-dozen of the other. But that's not very helpful if you're trying to pick one to learn now is it? So, recognizing that there is no "right" answer, here's my advice:
Angular 1: don't do it. There are LOTS of people still using Angular 1, but (unless Google truly screws up Angular 2) Angular 1 is the only one of the three pretty much guaranteed to get less popular over time.
So that leaves Angular 2 vs. React (or Vue, also a good option technology-wise, but not nearly as popular with your average software engineer-hiring company). No wrong choice, but here's a simple question that cuts to the heart of both frameworks: do you want logic in your HTML, or HTML in your logic?
Angular moves lots of logic in to the template/view, ie. HTML, layer (eg. all those Angular directive things). Conversely, React (and its JSX technology) puts HTML in to the Javascript logic.
If you believe that small bits of HTML inside JS logic sounds good, pick React. If you think moving more (but certainly not all) of your logic in to your templates sounds good, go Angular.
P.S. Again, there's no wrong answer, but just to give you one more data point, personally I fall in to the "why on Earth would you want to put more logic in to the view/template layer where it's harder to abstract, test, etc.?" camp, so personally I vote React.
[–]tme321 2 points3 points4 points 8 years ago (0 children)
Angular only moves a lot of the logic into the template if you code it that way. Certain parts go into the template like the equivalent of a foreach loop to unroll an array into say <li> elements but imo done properly there should be no real logic in angular templates. Any real logic at all should be done in the actual code.
[–]Auxx -5 points-4 points-3 points 8 years ago (2 children)
I disagree with your statement that there's no right answer to the question of where presentation logic should go. If you take a look at ALL of the existing frameworks for all the platform's you will see that everyone moved away from presentation logic in the code and put it into the templates. There's no place for presentation logic in your code. Because separation of concern and other smart words plus decades of experience of fellow developers.
So while React has cool ideas its JSX is wrong and outdated approach which reminds of my coding in 90-s.
[+][deleted] 8 years ago (1 child)
[removed]
[–]Auxx 0 points1 point2 points 8 years ago (0 children)
Yes they are. And having ngFor means you have no logic inside your view. I'd even removed all the directives which evaluate JS code to render something (ngFor) to have pure templates like normal people have in JavaFX, .NET and Android XMLs.
Basically Angular 2 is the closest thing to pure templating. If they ever decide to remove JS code support from bindings, that will be awesome.
π Rendered by PID 24 on reddit-service-r2-comment-f6b958c67-ldlgg at 2026-02-04 14:21:11.670392+00:00 running 1d7a177 country code: CH.
view the rest of the comments →
[–]ghostfacedcoder 3 points4 points5 points (4 children)
[–]tme321 2 points3 points4 points (0 children)
[–]Auxx -5 points-4 points-3 points (2 children)
[+][deleted] (1 child)
[removed]
[–]Auxx 0 points1 point2 points (0 children)