Angular, maintained by Google and one of the most powerful web development frameworks out there, is a pretty good choice for web development. To help you decide whether Angular is good for you, here's a list of Angular pros and cons.
Note: We are talking about Angular (2-12), NOT Angular.js.
Scroll to the end of the post for a summary if you don't want to read the whole thing.
- Angular sites are Single Page Applications (SPA). SPAs allow us to load new pages without requesting the server, giving a more dynamic and interactive experience. For example, GMail is a SPA.
- Angular is feature-packed. State? Baked in. Reactivity? Baked in. Routing? Baked in. DI? Baked in. Services? Baked in.
- Angular is cross-platform.
- PWAs: Use modern web platform capabilities to deliver app-like experiences. High performance, offline, and zero-step installation.
- Native: Build native mobile apps with strategies from Cordova, Ionic, or NativeScript.
- Desktop: Create desktop-installed apps across Mac, Windows, and Linux using the same Angular methods you've learned for the web plus the ability to access native OS APIs.
- Angular has automatic code-splitting so users only load code required to render the view they request.
- Angular uses TypeScript, which provides better tooling, cleaner code, and higher scalability.
- Angular is productive. It provides all the tools you need to scaffold apps and components. Angular provides a handy CLI which can generate production-ready apps and components with a single command.
- Angular's MVC Architecture makes it easy to separate styles from logic from markup.
- Angular has a flexible templating system which supports 1 or 2-way binding, pipes, custom structural directives, and more.
- Angular has built-in support for Services and Dependency Injection (DI). This further separates the business logic from your components, which provides cleaner code.
- Angular sets up testing frameworks automatically. With Karma for unit tests, you can know if you've broken things every time you save.
- Angular has a built-in animation API for high-performance, complex choreographies and animation timelines with very little code.
- Pre-render Angular with Angular Universal and serve the first view of your application on Node.js, .NET,
PHP, and other servers for near-instant rendering in just HTML and CSS. Also paves the way for sites that optimize for SEO.
- Angular is a SPA, so it has limited SEO capabilities. But, you can prerender Angular using Angular Universal.
- Angular has a steep learning curve, But it's worth the effort, as Angular is super powerful.
- Angular is complex and verbose, so it's not really suitable for small apps. It's designed for complex systems.
Angular is a powerful framework if you are willing to spend time and effort learning it. It has all sorts of features like DI, Services, Components, and more, but its SPA nature makes it bad at SEO. It's also not the most popular framework, owing to its steep learning curve. It's also highly focused on scalability.
Use Angular if you are building large, complex applications that should be scalable and modular.
Don't use Angular smaller apps which don't need all the complexity Angular provides. Don't use them for static sites, because of the accessibility problems and over complexity.