I have a little problem with my system. I'm trying to add a component that i've I created, to the template of another component, it goes like this:
I have a menu component which has many buttons, when each button is pressed it sends a parameter which indicate what type of information to show and redirect to some other page (to different url).
There, in the other page I take the parameter (which is a string), comparing in to a array and for each node in the array, which its key is the same as the parameter, I need to create an instance of my component with the relevance information and display it on the page. There maybe sometimes only one match and sometimes 4-6 matches.
My problem is that I can't understand how to put my component tag into this page template.
for example: my component called "viewInfo" and it get a paramter called "data", I want to add it to the template like this:
...
<viewInfo [data]='newData'></viewInfo>
...
...
So when I add it manually, it works, but in run-time I can never know how many node in the array will be the match the parameter.
Anyone has some kind of idea that could help me?
Thanks.