Environment
Angular officially comes with cli, react does not
cli has to be installed globally though
components declared in order to be used in angular.
Angular much more of a package for development but as with create react app, it ties you in to one way of doing things which usually leads to a lack of flexibility with design etc.
Development experience
Typescript by default, good if you know it, not if you don’t!
Lots of files for one component feels detached.
About face on the class vs functional strategy of React (welcome back, ‘this’). Bascially if you want to know Angular & React you need to know everything about Javascript. They are not shortcuts, just packages that provide tools and patterns written in Javascript that help you build apps.
It’s why some experienced JS developers still hold a flame for class based components in React, they are at the end of the day a foundation of Javascript. Good read on someone else who was curious about this https://medium.com/@vapurrmaid/should-you-use-classes-in-javascript-82f3b3df6195
Classes are a way of expressing prototypal inheritance. The concept of a ‘component’ actually fits this well and it would seem angular still recognises this as a good pattern to base its framework on.
No Webpack! I was shocked to discover that the main development environment doesn’t use Webpack but the Typescript/Ecmascript import mechanism. Apparently the Angular cli does behind the scenes but the config is hidden among the packages that angular installs. I’m not sure how I feel about this but everything that webpack does appeared to be handles well. I’m sure things would start to become more complicated when wanting to use things like sass though.
You can manually switch to production mode within Javascript as well as through the environment variable. Handy to test any nuances that occasionally come up (though if written well shouldn’t).
Rendering Elements
Angular uses bog standard html templates decorated with angular’s own directives.
Template directives are weird, why do in a template language what you can do in Javascript? It’s just more ‘stuff’ to learn and extremely opinionated IMO.
That said, I do understand the desire here to shorthand things that happen a lot, you can do this with helper functions though.
Framework developer
Angular is developed and maintained by Google to solve in house issues that Google faced when maintaining it’s software across the company of thousands of engineers, millions of lines of code & hugely varied projects schedules. Much the same reasons why Facebook developed React.
https://2019.stateofjs.com/front-end-frameworks/
Conclusion
I actually really enjoyed working with Angular and if I were to start a new app I actually think I’d gladly use it. There is a caveat to this though in that unless you have worked with Javascript intimately, Angular does feel a bit like create react app would have to those not familiar with React. By this I mean that Angular feels much more like you’re learning someone else’s opinion of writing Javascript rather than learning Javascript itself.
It is a robust development environment for building an app but that is definitely it’s primary objective; the right tool for the job!
I like the pattern for creating services through dependency injection and typescript integration which makes it feel a lot like working with something like .NET Core. Its choice of using the rx js package for async support is I’m sure intentionally suited to Angular and a good one size fits all approach which felt like it would avoid many instances of Promise handling.
Heroes journey from workplace as illustration
“Put that on a zip disc; send it to your lawyer”