In which of the following situations would you use an @Input() decorator in a component?

  • To define local variables
  • To emit custom events from the component
  • To inject services into the component
  • To pass data from a parent component
The @Input() decorator is used when you need to pass data from a parent component to a child component, allowing the child to receive input data.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *