Is there any way to get template rendered with data bound on angular2. eg: Model :
{
"level0": {
"level0-child0": "Value",
"level0-child1": "valuecheck",
"level1": {
"level1-child0": "check"
}
}
}
from this model, if "level0-child0" is === Value, I want to display the template in ImageComponent.
similarly, if level0-child1 === valuecheck, I want to display the template in ImageOneComponent.
Is there an option of dynamically build template from Component-class!
What I have tried is: Have acheived a recursive call to each keys in JSON.. But I am looped with in searching for DynamicCompoentResolver
Where Image/ImageOneComponent are, two different components, with templates, <img src="image1"/>, <img src="image2"/>
respectively