Post

Did you know @Input() can auto-transform values with zero boilerplate?

✅ Required inputs
✅ Aliases
✅ Getters/Setters
✅ NEW: Input transforms like booleanAttribute, numberAttribute, or custom transforms!

🔁 Example: Auto-trim whitespace from input:

      @Component({
  selector: 'app-user',
  template: `<p>{{ username }}</p>`,
})
export class UserComponent {
  @Input({ transform: (val: string) => val.trim() })
  username: string;
}
    
Angular DEV
Angular DEV

Angular DEV

Community

We are a specialized tool that integrates you into a private Circle of 5 people. It's a shared responsibility system for founders, developers, and students.

Developed in EU