19 comments

[ 25.1 ms ] story [ 807 ms ] thread
Is anyone using Angular 2+ in prod? How is it working out and how complicated is it to upgrade 2 -> 3 -> 4...?
I use it in prod since 1 year yes.

Angular is totally ready to be use in prod since a long time now.

Very easy to update:

2-> 4 no gap but my project was starting

4-> 5, very few things on a already big project. In my case the HttpModule, and some internationalization adjustment.

Its basically pretty comparable to React at this point. You get a few more things out of the box, and its a fair bit harder to debug (but nowhere near as bad as Angular 1.x). Upgrading is painless (and the upgrades themselves are gradually chipping away at pain points in the lib itself)
https://github.com/angular/angular-cli/issues/8284#issuecomm...

That comment is more or less a recurring experience for me. I've been solving problems that are slightly out-of-the-box of the typical CRUD app, and Angular 2+ has been nothing but pain for me.

You can transpile with fusebox or ionic cli if angular cli is the problem. For my next project I will use fuseboz with lazy loading (currently I use ionic)
We've just upgraded from 4 to 5 and not had any major problems. Most of the issues we encountered were with the stricter type-checking in TypeScript 2.5, not changes to Angular itself. It took me about a morning to do the upgrade.

Overall, using the framework has worked out great. The other front-end frameworks we've used (including ng1) now seem rather toy-like in comparison. The biggest stroke of genius has to the hierarchical dependency injection. Letting a UI component provide injectable services to its children and their descendents instantly solves so much of the tension between integration and reusability that plagued us in the past.

And the template language is also brilliant. It actually understands the difference between binding to the string-based attributes of an HTML element, and the object-based properties of a DOM object.

As long as you stick with the defaults and fix warnings and linter errors it should be mostly painless (<4 hours).

This repo is really useful: https://github.com/cexbrayat/angular-cli-diff

It lets you diff a simple project generated with different versions of angular-cli; that way you can easily see the any configuration options etc that have changed between releases.

How big of a shift is moving from angular 1.x to 5?
It would mean completely rewriting your UI. Angular 2+ is a completely different framework from 1.x.

2+ shouldn't have even used the Angular name IMO.

FWIW some tools including an official one from Google exist to help in migration.

I've worked with both 1.3-1.5 as well as 2, 4 and 5 and if I inherited a 1.x codebase I'd rewrite it, if necessary one piece at the time.

Is Angular still cool in the JavaScript world? I have to take over an Angular 1 site. We have to make some big changes so we pretty much have to start from scratch no matter what.
You own a downgrade + a response :) Angular doesn't have to be cool to works. It's a mature framework. I find it very useful and I can do anything with it by now. Since it's ok with object oriented concept, and still actively backed by google, it will stay attractive in enterprise, most than any other js framework.
Don't forget that you also need to enhance your resume :-).
No, but whatever is cool today in the frontend space, will not be three weeks from now.

This is a major issue.

Not cool but well supported and easy to work with.

As other points out if a piece of js is cool today it is outdated somewhere next month.

Having worked extensively with both the old angularjs as well as angular 4 and 5 my recommendation is to switch to the new angular if you are going to keep developing it.

React is still cool and that’s been the preferred thing for awhile now
For what it’s worth - as the coolest guy that I know, I’m using react.
Remember people. We need AJAX because it makes websites faster and more interactive. That's the basic concept behind all these frameworks.

Specifically, the old model:

request -[latency]> [server] -[latency]> response

Needs to be replaced by:

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

request -[latency]> [server] -[latency]> response

Why ? Because it's faster ! Damn you !

That's just the front end, you're missing a few request/response cycles to microservices on the backend.