I'm trying to work out how to handle a particular situation where a variable that is bound to a template, itself has variable values controlled by a different parameter to the parent variable. Here's an example of what I mean:
Template:
<spell>
<em>Description: </em> {{ description }}
</spell>
Example Descriptions:
This spell deals {{ val1 }} damage and heals for {{ val2 }} health.
This spell grants {{ val1 }} additional armor.
Variable values:
[[30, 40, 50, 60, 70], [10, 20, 30, 40, 50]]
[[10, 20, 30, 40, 50]]
The description is determined by the ID of the spell being requested and the values in that description depend on the level of that spell.
From my searching around, I thought may the answer to this question was what I was looking for but that appears to need components for each dynamically used template. Is this really the right solution for what I'm doing or am I missing an alternative?
How can I use/create dynamic template to compile dynamic Component with Angular 2.0?