I am trying to do the following in my first Angular (4) porject:
<parent-component-A>
<child-component-X>//some template, css, logic etc...</child-component-X>
</parent-component-A>
<parent-component-A>
<child-component-Y>//another template, css, logic etc...</child-component-Y>
</parent-component-A>
<parent-component-C>
<child-component-Z>//a third different template, css, logic etc...</child-component-Z>
</parent-component-C>
...
The structure of my project for now is:
------------
| app |
------------
/ \
/ \
------------ ------------
|The parent| | other |
------------ ------------
/ |
/ |
/ |
/ |
/ |
------------ ------------
| Child-1 | | Child-2 | ... 3 and so on
------------ ------------
I am not sure how to implement the idea. In the app template, the main one, I want to refer to the selectors of "the parent", literally the html code above but as the children of the parent component must be loaded in its directives I don't see how I can change which child view to be loaded from there, so my guess is that it has to be specified in the app component, where "the-parent" component is used. How can I tell Angular which child component it to load int he view of the parent one? Shall I do that from the ' s template? Shall I change my project structure?