I have three components.
- CategoryComponent - list of categories
- ListComponent - list of elements of selected category
- ScreenComponent - composition of MenuComponent and ContentComponent
The ScreenComponent template looks like:
<category-list></category-list>
<elements-list [categoryId]="6"></elements-list>
I want ListComponent to get ID of category selected in CategoryComponent instead of hardcoded 6
. How can I do this? Is this correct approach or the CategoryComponent job should be done by ScreenComponent?