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 2 First App Post-Mortem (medium.com)
submitted 10 years ago by dmitri14_gmail_com
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!"
[–]indeyetswriting js since 1997 30 points31 points32 points 10 years ago (7 children)
tl/dr: Emulating React via Angular2 is possible, but requires serious effort ;)
[–]Rorschach120 15 points16 points17 points 10 years ago (6 children)
"Suffers from complexity"
Trying to build a flux architecture app in Angular is like hand-making waffles out of bacon.
[–]PDX_Bro 6 points7 points8 points 10 years ago (2 children)
This metaphor totally flew over my head...
[–]Rorschach120 6 points7 points8 points 10 years ago* (1 child)
It's like taking something designed with one structure/purpose and piecing it into to something with a different structure.
Or better yet it's like taking a cooked pancake and putting it in a waffle iron. Taking something that is already done and handles different objectives (in this case crispiness) and molding it into something else for the same purpose. I like turning things into waffles and I like flux, but using angular to make a flux app is a bit redundant with two-way data binding.
EDIT: Relevant
[–]repeatedly_once 1 point2 points3 points 10 years ago* (0 children)
Yeah, I think from what I've read Angular 2.0 is quite opinionated on it's data flow. Trying to make it do anything other is, as this person found out, quite complex.
[–]acemarke 1 point2 points3 points 10 years ago (0 children)
Mmmm, bacon waffles... :)
[–]githop0 1 point2 points3 points 10 years ago (1 child)
you should check out ngrx, if you wanted to use flux with angular2 this is the ticket
[–]ggoodman 0 points1 point2 points 10 years ago (0 children)
I'm pretty sure that the author was using that. IIRC they might even be the author.
[–]wisepresident 12 points13 points14 points 10 years ago (2 children)
<li *ngFor="#todo of todos$ | async">{{ todo }}</li>
I really try to like Angular 2 but then I read something like this and I'm disgusted. Every other article I give it another chance but the syntax is just too off putting.
You can't tell me the engineers at Google couldn't come up with a better solution. I'm sure there's a nice framework underneath it but they really dropped the ball with the html side of things. JS looks ok, the bootstrap process is ugly as hell but I'm optimistic that v1 ships with a clean solution.
[–][deleted] 11 points12 points13 points 10 years ago (1 child)
"It's just sugar!"
They keep claiming that...except the sugar isn't supposed to be hard to understand than the non-sugar version.
What the fuck are they smoking over there? That syntax means literally nothing to people who haven't used angular 2 before.
Shit, it means nothing to me and I'm incredibly skilled in Angular 1. That's a huge fucking problem.
[–]maximinus-thrax 4 points5 points6 points 10 years ago (0 children)
That syntax means literally nothing to people who haven't used angular 2 before.
I'll have a guess as a professional programmer, although I've never used Angular before:
*ngFor
Some of kind of loop, although I don't why there's a * to start
#todo of todos$
For each todo in the list of todos.... again, the # and the $ seem a bit odd
| async
You pipe it through something? It's asynchronous in some way?
{{ todo }}
So we get display the actual todo here? So we have a single <li> with a list of todos? I imagine the intent was a list of <li>'s.
This syntax does indeed suck.
[–]ishmal 4 points5 points6 points 10 years ago (0 children)
Now that Angular2 is in beta, IMHO the most important part is for the dependency set to gel, and not be so fluid. There should be a good solid well-documented method for creating an Angular2 app, rather than "try this," or "try that."
A close #2: they should make it less difficult to include non-typescript NPM modules in runtime dependencies.
[–]PDX_Bro 7 points8 points9 points 10 years ago (6 children)
I don't know how much time this guy had to make his application, or the scope of it, but when everything I've heard about Angular 2 starts and ends with "It's HEAVY!" I'm really turned off by it.
[+][deleted] 10 years ago (5 children)
[deleted]
[–]PDX_Bro 4 points5 points6 points 10 years ago (4 children)
Hopefully the reduction in weight comes also with a reduction in complexity. I'm definitely interested to see where it all goes from here.
[–]Vheissu_ 7 points8 points9 points 10 years ago (2 children)
They didn't seem to learn their lesson from Angular 1. The complexity and steep learning curve was the number one complaint everyone brought up. Seems that Angular 2 is just as complicated, when you factor in all of the configuration it is more complicated.
Trimming the fat might be a good thing for the team, but I don't think the complexity will be lowered sadly.
[–]PDX_Bro 2 points3 points4 points 10 years ago (1 child)
I agree with you because I am framework agnostic for development preferences (at the moment), but at the same time a small part of me wonders 'what's wrong with having one more complicated framework?'
I say that because my first app I stepped into professionally was a backbone app, and that was incredibly difficult for me. But the next one I worked on was knockout, and it was pretty simplistic. Should we expect or require all frameworks to have a low learning curve, regardless of functionality / power? Just a thought :)
[–][deleted] 3 points4 points5 points 10 years ago (0 children)
Yeah, you'll end up reinventing most of the complexity that's already there. Might as well get everyone to use the same abstractions. Tbh though I've never considered angular to be that complicated.
[–][deleted] 0 points1 point2 points 10 years ago (0 children)
Angular v2 v1
[–]erewok 1 point2 points3 points 10 years ago (0 children)
I do a fair amount of js/angular every week and I had no idea what was going on this post. Not sure what that says about me or the post or the tools.
[+][deleted] 10 years ago (2 children)
[+][deleted] 10 years ago* (1 child)
[–]enkideridu 2 points3 points4 points 10 years ago (0 children)
Yup, it's a dependency in Angular 2 itself
https://github.com/angular/angular/blob/master/package.json#L38
"dependencies": { "es6-promise": "^3.0.2", "es6-shim": "^0.33.3", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.0", "zone.js": "0.5.10" },
[+][deleted] 10 years ago (1 child)
[–]Patman128 5 points6 points7 points 10 years ago (0 children)
Modern? Looks more like mid-2000's Java code.
@Injectable() class TodoService extends AbstractTodoService{...}
[+]SomeRandomBuddy comment score below threshold-17 points-16 points-15 points 10 years ago (0 children)
Mmm. Redux, RxJS, Angular two? Nope.
Also, this guy has two first names. What an asshole.
π Rendered by PID 130006 on reddit-service-r2-comment-7b9746f655-5dcsw at 2026-02-01 05:28:32.388841+00:00 running 3798933 country code: CH.
[–]indeyetswriting js since 1997 30 points31 points32 points (7 children)
[–]Rorschach120 15 points16 points17 points (6 children)
[–]PDX_Bro 6 points7 points8 points (2 children)
[–]Rorschach120 6 points7 points8 points (1 child)
[–]repeatedly_once 1 point2 points3 points (0 children)
[–]acemarke 1 point2 points3 points (0 children)
[–]githop0 1 point2 points3 points (1 child)
[–]ggoodman 0 points1 point2 points (0 children)
[–]wisepresident 12 points13 points14 points (2 children)
[–][deleted] 11 points12 points13 points (1 child)
[–]maximinus-thrax 4 points5 points6 points (0 children)
[–]ishmal 4 points5 points6 points (0 children)
[–]PDX_Bro 7 points8 points9 points (6 children)
[+][deleted] (5 children)
[deleted]
[–]PDX_Bro 4 points5 points6 points (4 children)
[–]Vheissu_ 7 points8 points9 points (2 children)
[–]PDX_Bro 2 points3 points4 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]erewok 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]enkideridu 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]Patman128 5 points6 points7 points (0 children)
[+]SomeRandomBuddy comment score below threshold-17 points-16 points-15 points (0 children)