What's new in Angular 19 ?
Angular continues its rapid evolution (with new major versions every ~6 months). Now in November 2024, Angular 19 arrives, packed with powerful features that boost developer experience and application performance. From improved hydration to enhanced signals. Let's dive into the highlights from the Angular 19 launch event.
1. Standalone Components Are Now the Default
first time we meet standalone Component was in Angular 14 and have been improved with every release since. With Angular 19, all components, directives, and pipes are now standalone by default, eliminating the need to explicitly set standalone: true
.
Additionally, updates are seamless, the ng update
command automatically refactors existing codebases, ensuring a smooth and hassle-free transition.
2. Signals: Enhanced Reactivity
In Angular 16, we had our first meeting with Angular Signals, and it was love at first sight, and they’ve continued to reshape Angular's reactivity system. With Angular 19, several signal-based APIs have been promoted to stable status, including input()
, output()
, model()
, viewChild()
, viewChildren()
, contentChild
, contentChildren()
, takeUntilDestroyed()
, outputFromObservable()
, and outputToObservable()
.
Additionally, Jeremy Elbourne introduced two new experimental Signal APIs:
A. Linked Signal
- Enables local state linked to a computed expression.
- Provides an initial value.
- Automatically reverts to the computed value when the expression changes.
B. Resource API
- Simplifies handling of asynchronous values like server data.
- Integrates seamlessly with Angular's reactivity system.
- Offers both request results and status as signals.
To make the transition effortless, commands like ng g @angular/core:signal-input-migration
, ng g @angular/core:signal-queries-migration
, and ng g @angular/core:output-migration
automate code refactoring with ease. Angular Signals truly feel like a match made in developer heaven.
3. Angular Material: Simpler Theming and New Components
Angular Material continues to evolve with every release, and Angular 19 is no exception, This update introduces enhancements across two key areas:
New Theme API
- Simplify custom themes with fewer lines of code using the
mat.theme
API. - Generate custom color palettes with a new schematic tool, now supporting an expanded 12-color palette.
New Components and Features
- 2D Drag-and-Drop: Now supports horizontal reordering for even greater flexibility.
- Time Picker Component: A long-awaited addition.
- Improved Theming Documentation: Beginner-friendly guides and detailed component-specific instructions.
4. Incremental Hydration: A Game-Changing Performance Feature
Hydration one of Angular’s best features, evolving over the past few versions with innovations like full application hydration, defer views, and event replay. Building on this foundation, Jessica Janiuk introduced one of the most exciting additions in Angular 19 incremental hydration, now available in developer preview.
How It Works
- The server renders actual content instead of placeholders.
- On the client, content remains dehydrated until triggered (e.g., via interaction or entering the viewport).
Benefits
- Faster initial load times.
- Smaller JavaScript bundles.
- Reduced layout shifts and flickering for a smoother user experience.
Consclusion
That’s all for now! I appreciate you taking the time to read my article, and I’d love to hear your thoughts and feedback. As I continue to improve my writing, your insights are invaluable.
You can connect with me on:
- Bluesky: mohamedlamine.bsky.social
- X (Twitter): @Mohamed_LamineF
- LinkedIn: mohamedlaminef
Top comments (0)