I have some objects, each one has a property which shows their type, something like this:
[
{
"type" : "date",
...
},{
"type" : "phone",
...
},{
"type" : "boolean",
...
}
]
I want to have something which shows them in their proper templates, which may differ in DOM,(for example one just has a span, the other has a check box and an input text and so on). I want to do this in a generic manner. How can I do this? (I use angular, if it helps)