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:
http://sebastianpersson.com/
My LinkedIn:
/ sebastianpersson
Watch video Using @Input and @Output in Angular online without registration, duration hours minute second in high quality. This video was added by user Sebastian Persson 01 January 1970, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,079 once and liked it 34 people.