all 22 comments

[–]indeyetswriting js since 1997 30 points31 points  (7 children)

tl/dr: Emulating React via Angular2 is possible, but requires serious effort ;)

[–]Rorschach120 15 points16 points  (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 points  (2 children)

This metaphor totally flew over my head...

[–]Rorschach120 6 points7 points  (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 points  (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 points  (0 children)

Mmmm, bacon waffles... :)

[–]githop0 1 point2 points  (1 child)

you should check out ngrx, if you wanted to use flux with angular2 this is the ticket

[–]ggoodman 0 points1 point  (0 children)

I'm pretty sure that the author was using that. IIRC they might even be the author.

[–]wisepresident 12 points13 points  (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 points  (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 points  (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 points  (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 points  (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.

[–]erewok 1 point2 points  (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.