3 Useful Input Decorator Features in

Поділитися
Вставка
  • Опубліковано 18 лип 2023
  • #frontendSnack 24💡These 3 useful component input features make your code much cleaner in #angular16 🤓
    Level up your Angular skills with my advanced courses 🚀
    bit.ly/advanced-angular-courses
    💡 Follow me also in:
    Twitter - / decodedfrontend
    Instagram - / decodedfrontend
    LinkedIn - / dmezhenskyi

КОМЕНТАРІ • 19

  • @TheoLeChnow
    @TheoLeChnow Рік тому +5

    keep doing this short please 🙏

  • @Immerz
    @Immerz 11 місяців тому +3

    The alias would work nice with the transform. Perhaps you transform some input object to a formgroup. Then it would make sense to have it named differently after the transform

  • @ohskynyrdlynyrd
    @ohskynyrdlynyrd 5 місяців тому

    Просто лучший!

  • @haroldpepete
    @haroldpepete Рік тому +2

    you miss input routes, you can access route params directly in your component usign input decorator

  • @brucearmstrong5536
    @brucearmstrong5536 Рік тому +3

    Godsent

  • @zavv1163
    @zavv1163 8 місяців тому

    What would be the use case for 3rd tip?

  • @invictuz4803
    @invictuz4803 9 місяців тому

    Amazingly helpful tips! Just started learning Angular, required inputs wasn't a thing before Angular 16? How did Angular implement the React's equivalent of required props before?

  • @user-uy9zy1gy8b
    @user-uy9zy1gy8b 8 місяців тому

    Watching this I love Angular even more ❤️ These features are like motherʼs care!

  • @m.tahirnazir2111
    @m.tahirnazir2111 11 місяців тому

    yes learned new thing❤️

  • @kensei9531
    @kensei9531 Рік тому +2

    Excellent

  • @vadimr5847
    @vadimr5847 Рік тому +1

    If I remember correctly, the get must apper first , before set in order to work. And alias was available always as Input('alias')

    • @DecodedFrontend
      @DecodedFrontend  Рік тому +1

      Thanks for your comment. Maybe in some other languages the order of getters/setters matters but as far as I know in JS it is not the case. Yes, the input aliases were available always but 1 min is not enough to mention all these nuances, so I am happy that you mentioned it in the comments ;)

    • @eqprog
      @eqprog Рік тому +1

      I always learn something new from your videos!
      AFAIK the input transform wasn’t mentioned in angular’s “new features” post. Honestly that’s a pretty big one.

    • @DecodedFrontend
      @DecodedFrontend  Рік тому +2

      @@eqprog maybe because it was released as part of the minor 16.1 release later

    • @vadimr5847
      @vadimr5847 Рік тому

      @@DecodedFrontend Yes, You are totally rigths, I checked it out, there is no difference where place the Input() decorator -on get jr on set and also it does not depend of order in code. Thank you, as always useful video.

    • @hellicobacterpillory6677
      @hellicobacterpillory6677 Рік тому +1

      I prefer ngOnChanges instead of getter/setter (angular 15 and below). Getters can cause performance issues. Or we can use pipe :)

  • @superduper1211
    @superduper1211 11 місяців тому +1

    what about router inputs ??

    • @DecodedFrontend
      @DecodedFrontend  11 місяців тому

      That’s available too but from my point of view it is more the router feature rather than inputs itself :)