How do components communicate with each other in angular 2?



How do components communicate with each other in angular 2?..

Answer / Soniya Sharma

Components in Angular 2 can communicate through properties, events, and services. To pass data from a parent component to a child component, you can use properties (Input decorator). For one-way communication from a child component to its parent, you can use events (@Output decorator). Services can be used for shared functionality across multiple components.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What are the types of controller?

1 Answers  


How to load select box during page initialization using AngularJS?

1 Answers  


Explain ng-model directive?

1 Answers  


Name the key features of angular js?

1 Answers  


Explain ng-init directive ?

1 Answers  


How are performance improvements on the core in Angular 8?

1 Answers  


What is linking function? What are post linking and pre-linking functions?

1 Answers  


How to share information between controllers in AngularJS?

1 Answers  


How do I know if npm is installed?

1 Answers  


What is the meaning of component lifecycle in angular 2?

1 Answers  


Is angular js in demand?

1 Answers  


List at down the ways in which you can communicate between applications modules using core angular functionality.

1 Answers  


Categories