
With Angular v19, transitioning from traditional decorators like @Input
, @Output
, and @ViewChild
to the new Signals API is easier than ever! Angular now provides dedicated migration commands to help you modernize your codebase with improved performance and reactivity.
π§ Migration Commands
β Migrate Decorators One by One
β’ @Input to Signals
ng generate @angular/core:signal-input-migration
β’ @Output to Signals
ng generate @angular/core:output-migration
β’ @ViewChild and Query APIs to Signals
ng generate @angular/core:signal-queries-migration
π Migrate Everything at Once
Want to convert all your decorators in one go?
ng generate @angular/core:signals
π‘ Why Use Signals?
β’ Better Reactivity β Built into Angularβs reactive system for more predictable state flow
β’ Faster Performance β Less change detection overhead means faster UIs
β’ Cleaner Code β Fewer workarounds, more declarative patterns
π§ͺ Example Migration: @Input β‘οΈ Signal
Before:
@Input() title!: string;
After:
const title = signal<string>('');
π£ Have You Tried Signals Yet?
Whether you’re experimenting or fully migrating, share your experience with Angular Signals! What features or patterns are you most excited about?