Hacker News new | past | comments | ask | show | jobs | submit login
AngularJS support is ending, and developers can migrate to Angular (twitter.com/angular)
68 points by tosh 14 days ago | hide | past | favorite | 52 comments

As an ex-AngularJS developer, who worked on porting a LARGE app to Angular - if you're in that boat, look into just rewriting in Vue. It's similar to AngularJS (more so than Angular) but with some extra niceties.

I used to do angular - went for a ride on the first ~3 versions of their rollercoaster. For me, Angular was a fantastic set of training wheels but I eventually hungered for more direct control over my circumstances. Moved to RiotJS for a few years, but then it got a little bit complicated/weird from our perspective.

These days, I just do vanilla JS/HTML/CSS. In some cases we serve our pages using server-side rendering techniques via Blazor, so there is no tricky state synchronization game to play over the wire. But, Blazor is mostly just doing what PHP used to do for us. We aren't diving into their component/binding ecosystem any further than we need to.

Biggest advantage with a vanilla stack is that you will never get trapped on an old version of one of these things and be forced to "migrate" (i.e. "rewrite") your application each time. Vanilla also means you don't have to submit yourself to any arbitrary package manager, build toolchain, et. al. Your entire product can fit inside 1 html document that just instantly works in any browser.

I worked on AngularJS and moved to Angular ever since 2+. It is a great platform and actually similar to Vue in some respects. No reason to abandon Angular although Vue and others are also good.

Angular is so different some AngularJS that it's really a different framework. At that point, as long as you're switching to a new framework, you should assess them all equally according to your needs.

I work in Angular, and yeah it's worth noting that Angular can be kind of exhausting to keep up with. While they haven't done as major of a breaking change as the jump from AngularJS to Angular 2 since then (I honestly don't even know why they have the same name, other than cause people knew the name), their release cycle is pretty fast, and there's entire websites dedicated to giving you bullet-point checklists of all the things to change/check as you upgrade from version to version.

I'm only a tad familiar with Vue, but it seems like you wouldn't have as many curve balls thrown at you by committing to that framework. Which makes sense with it being essentially 1 guy's project, rather than a giant like Google (who famously is not one to care for backwards compatibility)

We were very close to doing the same but then we discovered Svelte. Svelte has been a dream to work with so far.

When the deprecation was originally announced I basically just decided to sever from Angular all together. The "migration" practically involved rewriting pretty much everything anyway. The new thing is surely technically superior, but it just left me very bitter. I learned my lesson!

> The "migration" practically involved rewriting pretty much everything anyway.

I used the 10-step process outlined here and it was pretty straightforward: https://codecraft.tv/courses/angularjs-migration/overview/in...

There were definitely methods in the components that needed to be moved into services, but there wasn't really much rewriting per se.

FWIW the first five steps, in terms of upgrading the AngularJS app so that it used isolated components instead of nested scopes, was more time consuming than actually porting the modernized AngularJS app to Angular.

Same experience here. Despite tools provided by the Angular team, the migration was really, really painful. I spent a significant amount of time moving a large AngularJS app to Angular, and despite all the effort we were still far from completing it when I left the company.

These days I use Vue or React instead.

You should have talked to an old GWT dev before starting down the road of using a Google maintained framework.

I’ve seen gwt. It smells bad, but it seems supported still. Can you elaborate on your comment so I have conversation points next time I deal with that team?

Google hived off support to an open source foundation about a decade ago. It wasn’t well supported even before that for several years (I remember at one point they went through and closed all the open issues as Assumed Stale). They also loved to pivot best practices every year and stop developing the code that supported last year’s best practices.

As an outsider that’s an extremely insightful and not something I’d ever learn from official documentation. Thank you for your response.

This is why I never even considered flutter development. Who knows when the platform will just die on the vine.

Ive migrated several apps to angular 2 and assuming you got to angular 1.6 (or even just 1.4 with components) first, the rewrite is no big deal unless you heavily leverage specific things (root scope, some directive stuff, some template cache stuff). Especially with ngUpgrade available, I never found it terribly hard, though it did take time.

why would you be bitter since they just improved the platform. It wasn't hard to learn the migration and AngularJS needed to be let go. Angular is every bit as good as other alternatives.

AngularJS is a different framework. They are not the same and i think that was very clear from the start.

( I've written webapps in both AngularJS and Angular)

Yes obviously. Angular started as "Angular 2" (as in version 2 of AngularJS) and didn't exist until like half a decade after AngularJS. You think it was 'clear from the start' that they'd just abandon AngularJS? Why would anyone have used it?

Not only that, Angular 2 spent an extremely long time in beta with several major changes (the original architecture was built around "Object.observe", which was a proposed language feature that was canned after Google tried to implement it and realized there was no way to make it efficient). Users looking into Angular were actively discouraged from using Angular 2 prior to its stable release despite AngularJS being clearly a dead end and even after the dust had settled there was no clear upgrade path from AngularJS to Angular 2.

By comparison React has provided automated code migration scripts for every breaking change and continuous to support class-based components and lifecycle events despite most of the ecosystem having moved on to function-based components and hooks. Say what you will about React, Facebook or Meta, but at least there have always been clear upgrade paths that didn't involve rewriting the entire application from scratch.

It was clear from the start of Angular 2, not from the start of Angular (later renamed AngularJS).

Totally correct to discontinue the old AngularJS imho. Google, years ago, made one of the best choice adopting TypeScript for its new framework, Angular. I used to code in both AngularJS and Angular, and the improvement between the two is huge, thanks also to TypeScript. I'm a big Angular fan, even if I tried React, I highly prefer Angular for being more strict, complete and imho more suited for very big projects.

> I'm a big Angular fan, even if I tried React, I highly prefer Angular for being more strict, complete and imho more suited for very big projects.

I agree, I just moved us to Angular 13 and I love every second of it.

I've worked on React projects but will take Angular any day of the week.

Having worked with both, react much much less, but more recently, I find react just simpler to get stuff done with. Angular has a pretty rigid structure that I felt required more files and code (even if you just use the ng CLI to code gen the initial component or service) to do the same thing.

Obviously the batteries included nature of Angular is nice. But otherwise I felt less burdened by the amount of code I need to write and read in react.

RxJS is nice though and testing via dependency injection as long as your app isnt a horrible mess and has good decoupling.

Imo react is simpler to get stuff done with up until a certain point. Every large react project I’ve contributed to, or adopted, had the same overhead you described of Angular. Further, each had built custom abstractions due to the nature of how integration works with react. Some apps were fine, some had 1000+ line state files, 1000+ lines of hooks management before a render, weird ways of using context or passing props.

Today we still prototype mostly with react. It’s easier to staff junior devs around and empowers them when it comes to trivial logic with cool UX.

Any large scale work, or prototypes going to prod, do so with Angular. Where we’re confident in the Sr level engineers writing that code.

I also just finished migrating from AngularJS to Angular13. I have to say, it was very straightforward and not especially difficult. And going from a custom webpack setup to the angular CLI is pretty amazing.

I'm enjoying Angular development too, although the Angular Material library is... not great. Lots of corner cases that just don't get enough attention.

We use PrimeNG and I would highly recommend it.

It's under MIT also which is a bonus depending on your use case.


Can you clarify what you mean by "more strict"? I've been using React since before Redux existed and while these days I don't think there is any need for a state library anymore I of course agree that Angular is more complete as one of the first decisions you make when starting a React project is which routing library to use (e.g. react-router or reach-router, or if you want an integrated solution, remix or next) and what to do about network requests (e.g. react-query or one of the many GraphQL libraries).

I also think it's worth pointing out that people have very different understandings of what "very big projects" are. I think you mean projects with many different people working on it, in which case I agree, but often people misinterpret these statements thinking that their 1-5 person team working on a web app is a "very big project" because they have a million users.

AngularJS seemed to be the last well supported fronted library that let me just write JavaScript, and not need to pull in the entire node ecosystem just for making a simple website.

It's insane to me that websites need to be compiled these days. My websites mostly consist of an index.html and a code.js, and then unzipping whatever goofy template into the js, css, images folders etc. I feel like requiring a fluent understanding of the entire node ecosystem build even the simplest websites is a big enough hurdle that a lot of enthusiastic new people are just going to give up and do something else.

"Clarification: AngularJS and Angular are different frameworks. The announcement for end of life is for AngularJS that Google released in 2010.

Angular is in active development and growing. Exciting big changes coming in 2022!"

> Originally, the rewrite of AngularJS was called "Angular 2", but this led to confusion among developers. To clarify, the Team announced that separate terms should be used for each framework with "AngularJS" referring to the 1.X versions and "Angular" without the "JS" referring to versions 2 and up.

-- https://en.wikipedia.org/wiki/Angular_(web_framework)#Naming

Well, nice try I guess. Still, they do say that "Naming things" is one of the two hard problems in computer science.

> "Naming things" is one of the two hard problems in computer science.

For those who don't know, the other two are: Cache invalidation, and off-by-one errors.

1 instead of zero index based languages such as e.g Julia therefore remove a LOT of cognitive overhead.

Not using indices at all when iterating whenever possible completely eliminates the cognitive overhead.

Yes except when it's not possible or require non-reusable custom iterators.

Can't quite put my finger on it, but I just can't shake off the feeling that your quote from wikipedia is implying blame on the "end user" devs for the confusion, instead of the team for naming things so badly.

> Those stupid developers don't realize that AngularJS and Angular2 are two completely different frameworks! Okay, I guess we need to make it now VERY CLEAR that they are different. How about AngularJS and Angular? Sounds good, right? Now it should be clear to everyone the two are different frameworks.

Switched from AngularJS directly to Vue.js after the months of confusing messaging, no regrets, Vue.js is what Angular2 should have been, in my opinion.

As if anyone stuck on AngularJS has been upgrading or needing support to begin with. Simply updating from 1.2 to 1.5 breaks most apps.

Our company saw the writing on the wall several years ago and completely ditched AngularJs and moved to React. It was wildly successful - after the whole project was rewritten there was dramatically less code, even though we added tests and new features along the way.


Just doing it piece-by-piece was a really good strategy, instead of a stop-the-world rewrite.

I was asked to use angular in a java job.

I was going crazy with all the files you need to have for a small project.

It's like all the horrible sides of OOP and abstraction, but on steroids.

I have the same problem with Angular that I have with Spring - nobody can actually articulate what problem these frameworks are trying to solve (other than the problem of there not being a framework?). They both feel like tons of overhead with zero actual functionality.

Modern Spring framework (annotation driven, no more XML config hell) offers a lot. Spring Boot is one of the easiest ways to start a backend Java app, microservice or monolith.

You get ORM, a web framework, dependency injection, messaging, and a whole lot more just by including the modules you want. You can learn the basics in an afternoon of reading documentation. The major IDEs have very good plugins.

A legacy Spring app can be absolute hell, though.

That said, Angular (1.x) was the worst professional experience of my life. It was the only technology I absolutely could not learn enough to get comfortable with, despite working with it daily for over 2 years. Non-stop banging my head against my desk. That job caused real depression, burnout, health problems.

> You get ORM, a web framework, dependency injection, messaging

But you can get all that stuff without Spring, too. And Spring adds another layer in between you and the ORM, the web framework and the messaging framework - a layer that's heavily reflection-based and makes a ton of undocumented assumptions about how things are set up and throws cryptic error messages when those assumptions are violated.

You certainly can, but it is like a mechanic buying sets of tools from many manufacturers. The Spring framework modules share a consistency of conventions and documentation that is itself valuable.

Like any opinionated framework, it's going to make assumptions that can cause headaches, but it's mature enough that most issues I run into are a Stack Overflow away.

I genuinely can't, after 20 years or so of trying, get my head around why people think that, but it seems like everybody except for me does think that, so I must be the one missing something.

I don't think Angular targets small projects, but enterprise projects.

> It's like all the horrible sides of OOP and abstraction, but on steroids.

Can you go more into detail?

I feel you. I have worked on an Angular project for over a year and was miserable working with it (and I _really_ tried to like it).

At first glance it seems "complete", but once you start building there's just so many insane edge cases that don't work well or have bugs. I also think that "integrating" RxJS was a mistake, while I get it and it's nice, it's imho too low level of an abstraction if you have many people that don't necessarily want to learn all the details (easy to shoot yourself in the foot with it), too different from anything else in JS, and too poorly integrated into angular.

And also the verbosity of everything.. was too much for me.

For those who don't know, it's possible (and encouraged) to migrate your app gradually as a hybrid application. You don't have to do it all at once up front.

It's strange to think I was working on AngularJS and Flash apps at the same time. Flash feels like it was a millennia ago, whilst AngularJS feels very recent. Maybe because AngularJS's successor keeps it's name fresh in my mind?

In the last five years, I have used Angular2+ full time. RxJS is the greatest superpower ever. Totally loving it.

Aren't these too different to just "migrate"? Isn't it going to be more of a rewrite?

No, you can either run them side by side (ngUpgrade) or move to angular 2 incrementally by first upgrading to angularjs 1.6 then going to angular 2. From there its a matter of moving up the angular 2 upgrade path.

The initial rollout of angular 2 vs angularJS was a confusing shit show (and will bite anyone getting into angular brand new as they hit constant google results for one angular when they want the other), but the upgradability is a case study in how to do it right in my opinion. They really made it accessible for anyone to move an app over.

Developers can also migrate to Vue

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