First standalone components to get rid of modules and now signals. There is quite some innovation happening in Angular while being a really mature framework.
I enjoy Angular as much as I love React, Vue or Svelte. It's always about picking the right tool. And when thinking of Angular it's that batteries-included framework that is godsend for big enterprises where any decision given by the outside is something you don't have to battle for.
Often I describe Angular as a hidden champion. It's loved and trusted by enterprises while they are not really talking about it. Plus they hide all the package downloads behind their own npm caching servers like Nexus or Artifcactory.
On the other side there are tons of individual engineers working with React or Vue (for good reasons) and writing blog post after blog post. Maybe that's one reason why folks think Angular is dying? I don't see any signs of that though.
Angular is as little innovative for web frameworks as Firefox-ESR is for browsers. It merely keeps copying features from other frameworks - just many years later. It is a chronically outdated framework that always struggles to keep up with its competitors. It would be ok if those were deliberate design decisions, but if the features get copied some day anyway, what is the point? Why not do it the right way from the start?
For example, this update brings us computed properties, an essential feature for any complex performant web application that was made popular by Vue.js 10 years ago [1]. And now in 2023 we get it in Angular, essentially a confirmation by its devs that its lack had always been a design error.
I also cannot understand the "mature" argument. For example, it took five years for documentation on the integral `<ng-content>` to arrive [2]. This is something I'd expect from the side project of a lone programmer, not an enterprise-level framework.
The only upsides of Angular are its "batteries included" approach and the (debatable) default of RXJS, while the downsides are plenty (see other comments).
What's the point?
If you copy after there is some proof that the features work in practice, you are less likely to implement something that's going to make everything worse instead of better.
Frameworks are experimenting with thousands of new features which might improve something, but this doesn't mean that they do in the end.
People rely on Angular, this makes it important that everything is thought through.
I don't want to become proof of concept tester for new features
> The only upsides of Angular are its "batteries included" approach
This basically trumps everything else though. Angular is likely going to have by far the lowest TCO for any projects with a 10+ year lifespan.
Like, sure, you need to watch 20 hours of Udemy videos to understand how to build an app, but that two weeks of work upfront is going to save you millions of dollars and multiple years of stress eating coffee pastries every morning.
Not quite, its webcomponent implementation is ahead of React's, which is still pretty poor. Its PWA integration has been among the simplest and most seamless I've seen. It's easy to cherry pick examples either way.
Computed properties has always been a possibility in Angular, you'd just create a getter[0] based on multiple different values, works like a charm. This new way is probably faster, but I've honestly never had any issues with the other approach.
The problem I had with getters in a fairly complex application (WYSIWYG editor) was handling mouse events, in particular onMouseMove - change detection was triggered on every such event, and the application was very slow.
EDIT: It was slow because there were many getters based on other getters etc and everything was recalculated on each event.
I don’t think a computed property would behave any better. It sounds like your event handling should have been decoupled from change detection and only applied changes when necessary. This would probably be a problem in any framework.
The concept is actually slightly different. With memoization you store a map from inputs to outputs. A computed property doesn't necessarily do this, it just caches the result of the last computation.
The important part is that a computed property tracks its dependencies and is automatically re-calculated ONLY when necessary. If it behaves differently, it's not equivalent to the concept of a computed property in Vue.
Isn't that just semantics? Whatever name you give the feature "lazily computed and cached values in the context of web frameworks", previously Angular didn't have them (built in) and now they do.
Are you aware what comment tree you are in? This whole thing started because GP wrote this:
> For example, this update brings us computed properties, an essential feature for any complex performant web application that was made popular by Vue.js 10 years ago [1].
So obviously the relevant definition is "what the feature does in Vue". What is your issue here?
Every version essentially breaks the previous one.
90% of the information online is outdated or incorrect. By the time you start a project on Angular X, Angular X+2 is out which makes many things complicated, some deprecated.
It's true that it provides a robust set of defaults and libraries but those are generally an overkill for most projects.
On top of that there's a higher compilation complexity in Angular which I have seen every single Angular project struggle at some point.
> Every version essentially breaks the previous one.
This is simply not true. It might have been true in the early Angular v2 days, but since v6 or so, updates are relatively trivial.
https://update.angular.io has your back extremely well. The trick is to ensure whatever third party libs you're using have also been updated, otherwise you're application may break.
Even if we take it for granted that package downloads are hidden, how should we account for the ~40% drop in new questions in the Angular tag on Stack Overflow since its peak in 2018?
In the Stack Overflow developer survey last year, Angular was 52% loved versus 68% for React and 63% for Vue. Can we find a way to dismiss this as well?
On the freelancing platform Codementor, based on rough sampling, there have been about 338 Angular requests in the past year versus 2098 for React (6x).
Sure, Angular won't die outright because the enterprises that have adopted it will need ongoing support, but this seems like a weak metric for growth. For enterprises selecting a tech stack now, choosing Angular chops the hiring pool by a significant factor. I don't see evidence of advantages Angular offers overcoming that.
On the other hand, React has gained new life through frameworks like Next.js and maintained relevance. React's popularity is not just individual engineers making a disproportionate amount of noise on blogs. React hooks are the most established unit of construction for making components at this point across web, mobile, desktop and command line. That won't last forever, but there are too many signs of Angular trending out and React trending upward to dismiss.
The entire library is so spread out, with so many half-assed features.
When I wrote Angular I spent 2 weeks on getting something similar to `props.children` working. <ng-content> didn't work if the elements were dynamic. Outlet system was way too verbose.
The 2 way databinding is anachronistic and belongs in 2010.
The i18n system they shipped with is awful. No way to have translations in code, only in template. This breaks down very fast when building generic components.
Because of the opaque CLI I've spent 2 weeks figuring out why every third dev build resulted in a 150 line long tsc stacktrace, and it turned out to be angular's 1.x types package. Would have been so much easier with a webpack configuration.
The props.children/slots issue is one of my biggest problems with angular. It’s really hard to use composition like you always do in react.
Another thing is, that angular components always wrap their template into a block element (like a div) in the DOM. So if you do some refactoring and split up one big component, the result in the DOM is different and your CSS may not work anymore. If you are using flexbox or grid, it may even be impossible to split the component.
> <ng-content> didn't work if the elements were dynamic
Usually if you run into problems like that, you should use templates.
Honestly, I'm not sure why `<ng-content>` exists vs templates. I'm sure there's a reason (verbosity?), but templates have way fewer caveats.
> Would have been so much easier with a webpack configuration
I agree. It's not hard at all to do a Webpack configuration of Angular. Just add the Angular plugin. (That's what the CLI does under the hood.) I wish they document it though.
This has been a debate since long before React or Angular existed. Keeping code and templates together typically makes sense to programmers while keeping the template as html in a separate file means you can edit it in any html editor, no special tools needed. I've always been partial to keeping them together, but working with designers who prefer it the other way, I can at least respect where they are coming from.
> It uses invalid HTML, with attribute syntax including brackets and parentheses
Brackets and parens are valid in attribute names.
Section 13.1.2.3 of the HTML standard[0] states:
> Attribute names must consist of one or more characters other than controls, U+0020 SPACE, U+0022 ("), U+0027 ('), U+003E (>), U+002F (/), U+003D (=), and noncharacters.
It's my answer to what I can tell you agree is the most important question in software engineering - "What programming language has the shortest 'Hello World' program?"
We're talking about a framework here, not a programming language. I don't think the above poster's assessment about the amount of files needed for hello world offers a charitable conclusion either, given frameworks are not languages. The same file usage would apply to many other popular 'heavy' opinionated frameworks.
There’s a grain of truth in that thought. First impressions matter, frameworks aren’t exempt from that basic psychological fact. If you treat ’complexity of hello world’ as a proxy for learning curve steepness (again, people do things like that subconsciously), you may end with a very wrong assessment very early. It’ll probably tell more about the assessor than the framework but it’s a real risk.
> In my experience people that hate Angular don't understand why they hate Angular.
One of my major annoyances is the templating language. Completely unnecessary and over complicated, compared to JSX. Just another weird syntax to learn with its own arbitrary limitations and quirks.
I think it’s a good indicator of the overengineering surrounding Angular overall.
I see it as the opposite. JSX is a convoluted mess, and does not make for easy reading due to being mixed in with everything else, while Angular promotes clean separation and promotes a template language like many others. It's usually React codebases that I've seen overengineered due to lack of features, while Angular codebases are very same-y - that's a good thing from maintenance perspective.
Obviously there's some matter of taste, but JSX is simpler in my mind, because it's just JS with a tiny bit of syntactic sugar to have nicer function calls for components. That's it. Anything you can write in JS, you can write in JSX and it works. You can debug and use all the tools you'd use for regular JS.
With Angular templates, there's an entire new language, with its own weird syntax ngIf/else, ngSwitchDefault, let-*, pipes and other components that get pulled in based on whether you forgot to set up correctly or not in modules far-far away somewhere in the codebase, brackets of different sorts having different functions and just a lot more stuff to remember. And if it doesn't work, you're gonna get a silent error most of the time with no easy way to set a breakpoint to investigate.
I also don't believe there's any real separation between the HTML templates and the Component class, just because they're written in separate files. They're just as tightly coupled as any regular React component, just harder to follow. I don't think I've ever seen an Angular component, where you could swap out the template, without making simultaneous changes to the Component to accommodate it, which should be possible if they were truly separate.
I haven't had the chance to work with either much, but at the end of the day, a new new syntax just for doing fancy if/else/for seems unnecessary. I believe Angular's hand was forced since JS at the time didn't have as ergonomic syntax as it does now, with fat arrow functions, .map and other niceties.
Having mutability/2-way-databinding makes angular hardly benefit from using TypeScript. State is just so much pain and it is hard to make impossible states not representable in the types.
Angular requires a lot of extra steps to get the templates properly type-checked (and you even need an editor plugin for that). I can't even name which non-standard entries in the tsconfig are necessary to have all templates checked entirely.
Most people use the cli to generate new components. Where in other frameworks, you just create a new file, maybe use a snippet and call it a day, the cli yields a test, scss, html and the actual component code as separate files.
Having worked with angular and react for 5 years in parallel, I'm pretty certain that I'd never touch angular again. The DX is so complicated in comparison.
Despite forcing you to use TypeScript, angular is the framework that benefits the least of it.
I like Angular, but approach of doing the same thing in 3 different ways (promises, rx and now signals) make codebase more complicated and adds additional brain load.
A 3MB JavaScript runtime blob right out of the gate? ("Only" 275KB needed just to first render, like that's laudable on its own.)
Other frameworks have already loaded dependent REST/GraphQL data before Angular has even initialized.
Take someone on a mobile device and put them at the edge of cell signal range either because they're out an about or stuck in the bowels of a building with thick walls. Suddenly 275KB-3MB matters a lot more and the user is staring at a blank screen for 10+ secs.
Then there's the boilerplate, all the metadata you need to add to each component that has nothing to do with your problem domain.
And then there's runtime speed compared to alternatives.
While I'm truly happy to see Angular incorporate signals, now devs need to learn when to use signals rather than rxjs. I know now that it's the difference between needing async or not, but if you go down one path, it's a PITA to tear it down and rewrite for the new path.
THAT's why I don't like Angular, though I'd happily choose Angular over React and Vue, both of which are a prone to reducing codebases to big balls of mud due to their "flexibility".
How about the extra 30 seconds to couple minutes for CI/CD to make a production build for static deployment? V16 added the ability to put esbuild/Vite into the mix, but it still builds WAAAAAAAAY too slow compared to modern alternatives, especially if you're on v15-.
ng serve for development is a pig too. Save-reload cycle is far from instant.
I enjoy Angular as much as I love React, Vue or Svelte. It's always about picking the right tool. And when thinking of Angular it's that batteries-included framework that is godsend for big enterprises where any decision given by the outside is something you don't have to battle for.
Often I describe Angular as a hidden champion. It's loved and trusted by enterprises while they are not really talking about it. Plus they hide all the package downloads behind their own npm caching servers like Nexus or Artifcactory.
On the other side there are tons of individual engineers working with React or Vue (for good reasons) and writing blog post after blog post. Maybe that's one reason why folks think Angular is dying? I don't see any signs of that though.