Using @Input and @Output in Angular

preview_player
Показать описание
This video explains data communication in Angular between parent-to-child component and child-to-parent component. The most common and effective way to communicate from the parent-to-child component is through Input decorators. With the input decorator, you can pass in pretty much anything that you would prefer the child component to have. The Input decorator should be passed in from the HTML of the parent component. In a very similar way to the Input decorator, you can communicate back from the child to the parent component. The Output decorator should be of the type EventEmitter (make sure it's imported from @angular/core, otherwise it won't work as excepted). Once that is set up, you need to emit a value and listen for it in the parent component.

#Angular #DataCommunication #JavaScript #input #typescript

My portfolio:

My LinkedIn:
Рекомендации по теме
Комментарии
Автор

keep it up bro, i have just started learnig angular. I wish you continue your lecture series !!!

mohitsharma-epiy