Angular Pass data to child component.
#angular8 full tutorial in hindi | #Input #decorator in #angular9 | parent component to child components in angular 9
Let’s put this in practice!
@Input decorator
Let’s say that we have a component named ‘parentComponent’ and another component named ‘childComponent’. The parent wants to send a simple message that will be caught and displayed by the child.
So first, let’s create a simple string variable in our parent.component.ts file. It will contain the message that we want to give to our child.
Comments
Post a Comment