@Input() And @Output() Decorator In Angular
December, 2019 / by Krishan Dutt Sharma
In this article, I am exploring two very important points, related to Angular 2 + version, which the part of Parameter Decorator and these points are called @Input and @Output decorators. Both are used to transform the data from one component to another component. Or, you can say pass the different types of data from parent to child component and child to parent component. Or, in a simple way transform/exchange data between two-component.Let's explore each, one by one.
@Input is a decorator to mark a property as an input. @Input is used to define an input property, to achieve component property binding. @Inoput decorator is used to pass data (property binding) from parent to child component. The component property should be annotated with @Input decorator to act as input property.Read More