Starting with Angular v16.1, we can now transform data using the @Input() decorator.
The @Input() decorator identifies an input property. We can use an input property to receive a value from a parent component. Or read a route from the URL.
The @Input() decorator provides three additional feature options for our input properties: alias, required (v16), and transform (v16.1). This video briefly describes the first two, then focuses on data transformation.
Content
00:00 The @Input() decorator
02:15 Alias the input property name
03:37 Require an input property
04:33 Transform a value before assigning it
05:44 Create a reusable transform function
05:55 Built-in transform functions
06:21 Using the booleanAttribute transform function
07:51 Using the numberAttribute transform function
08:23 Sample code
Links
YouTube video "Use @Input() to Read Route Parameters in Angular": • Use @Input to Read Angular Route Parameters
GitHub source code: https://github.com/DeborahK/Angular-E...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I love teaching and creating content for developers! I create YouTube videos and write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 10,000+) over the past 5 years.
For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award in Developer Technologies, and I'm a Google Developer Expert (GDE) in Angular.
Contact me on Twitter: / deborahkurata
Find my Pluralsight courses: https://www.pluralsight.com/profile/a...
Access my freeCodeCamp articles: https://www.freecodecamp.org/news/aut...
View my YouTube content: / @deborah_kurata
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular #bestpractices #angulartutorial #demo
#angularparentchild #componentcommunicationinAngular #angularcomponentcommunication #componentinteractionAngular #componenttocomponentcommunicationinAngular #componentinteractioninAngular #passingdatafromcomponenttocomponentangular
In questa pagina del sito puoi guardare il video online Transform Data with Angular @Input() della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Deborah Kurata 13 luglio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 8,142 volte e gli è piaciuto 430 spettatori. Buona visione!