Angular - 5.8- Summary of custom properties and event links
Let me quickly summarize what we’ve learned so far, because it’s really important.
This communication between components is a key feature, and with the addition of entries, you can make your properties binding outside the parent component by using that component. And the same goes for the output, which allows the parent components using this component to listen to your own events you created with New Event emitter. These are such important features in your application.
We’ll use them in the recipe book in the next section, as it really allows you to make your application very dynamic, to use many components and to make them communicate with each other. The drawback of this approach is that if you want to communicate between two components next to each other, it can be difficult to send a message in a component, to modify something in the parent component, and then transmit this new data to the child component. And these input and output chains can really get more complex.
This is a feature you will use a lot because it’s not bad at all. There are use cases where the distance between two components that must communicate with each other is so great that the construction of an output and input chain is not very practical. That is why, in the services section of this course, I will show you another approach that allows components to communicate with each other, although this is important. This will not be a better approach, just a better tool for a specific use case.
A use case like this is usually managed with an input and an output as we do here. It’s the perfect tool for this task and it’s so important. You’ll see it used a lot throughout the rest of this course.