Angular

Data sharing between components in angular 2 and above

Since Angular 2, we can use below listed to send data or paly with data from one component to another. Data will send by pass by value.

  • @Input
  • @Output
  • @ViewChild
  • Event Binding
  • Through Service

First three are used in case of parent child component and “Through Service” is used to send data from any component to other.

If you want sample code example please comment.

Leave a Reply

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