filmov
tv
Pass data from parent to child component in angular

Показать описание
Text version of the video
Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.
Slides
Angular CRUD Tutorial
Angular CRUD Tutorial Text Articles & Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
In this video we will discuss how to pass data from the Parent component to Child component using input properties. Let us understand this with an example.
At the moment, ListEmployeesComponent is doing 3 things
1. Calls the Angular EmployeeService to retrieve employees data
2. Loops through each employee
3. Has all the display logic to display employee details
Now let's create another component and off load the responsibility of displaying employee details to that component. Let's name this new component - DisplayEmployeeComponent.
Here is the Angular CLI command you can use to generate the component
ng g c employees\DisplayEmployee --no-spec --flat
For the code used in the video, please refere to the text article using the link below
To create an input property decorate the property with @Input decorator
Input properties are typically used to pass data from the parent to child component
Next video : Intercepting and reacting to INPUT Property Changes
Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.
Slides
Angular CRUD Tutorial
Angular CRUD Tutorial Text Articles & Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
In this video we will discuss how to pass data from the Parent component to Child component using input properties. Let us understand this with an example.
At the moment, ListEmployeesComponent is doing 3 things
1. Calls the Angular EmployeeService to retrieve employees data
2. Loops through each employee
3. Has all the display logic to display employee details
Now let's create another component and off load the responsibility of displaying employee details to that component. Let's name this new component - DisplayEmployeeComponent.
Here is the Angular CLI command you can use to generate the component
ng g c employees\DisplayEmployee --no-spec --flat
For the code used in the video, please refere to the text article using the link below
To create an input property decorate the property with @Input decorator
Input properties are typically used to pass data from the parent to child component
Next video : Intercepting and reacting to INPUT Property Changes
Комментарии