AddEditPersonComponent: It will carry a Form to submit data.DashboardComponent: Dashboard component will contain both following Child components.Now open a new application your favourite IDE Step 2 – Create Required Componentsįor a demonstration of discussed scenario, we will create three Components in our Angular application. ng new angular-pass-data-appĮnter into the project directory cd angular-pass-data-app Step 3 – Configure Parent-Child Componentsįirst, create a new Angular app or use your existing project.
#Use servetome app data how to
Let’s implement the use-case How to pass data from parent to child or child to child in Angular? The submitted values will pass to the other Child to list values in a table.
The first child will have a form to submit values. The application, that we are goin to develop will have a parent Dashboard which will have two Child components. If you have to implement data communication of similar types at multiple places in the application you can consider services for that. This is the most efficient way in case you need to communicate data transfer at one place only. This Angular post is compatible with Angular 4 upto latest versions, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11, Angular 12 and Angular 13
In this Angular tutorial, you will learn how to pass data from one parent component to its child and child adjacent child using the Input/ Output decorators.