Let's say I have the following object:
{
"items": [
{ "type": "groupA", "name": "title 1" },
{ "type": "groupB", "name": "title 2"}
]
}
I have the following ng-repeat
going on below:
<div ng-repeat="item in data.items">
{{ item.name }}
</div>
Ideally, I'd love to be able to show how I display item.name
depending on the type.
So for example, if the type is equal to groupA i'd like to have:
<input value="{{ item.name }}" />
And if the type is equal to groupB, i'd like to have:
<div>{{ item.name }}</div>
Is this possible? Does anyone have any suggestions on how I could accomplish his? I'm new to angular so any help would be appreciated.