I have a directive which is given as an attribute one of 13 types it can take. Depending on the type the directive should return different HTML elements that represent the given type. The value of the type will be constant - won't change after directive is compiled.
<directive type="{{ type }}"></directive>
I have an architectural problem. Should I handle all the types inside 1 directive (so that the directive returns different templates depending on type value) or differentiate the type cases at the template level into 13 different directives (call a proper type of directive depending on type value)? In short should I put the switch (type) inside a inside a directive or leave it at the template level?
Then the implementation. What would be the implementation of the proposed solution? In short how to implement that switch (type) either inside a directive or a template.