I'm trying to make an angular-repeat inside another angular repeat. If I write:
{{field.labels}} It outputs an array like this:
[{"name":"media","label":"Media"},{"name":"frilans","label":"Frilans"}]
If I try something really simple, like
<fieldset
class="options"
ng-repeat="mylabel in field.labels"
>
<input type="radio" >{{mylabel}}
</fieldset>
It seems to be working, because the number of input-tags correspond to the number of items in the array, but It won't output {{mylabel}}. Why?
Here is a complete sample of the code: http://codepen.io/anon/pen/FEyir
Here is the complete field-variable, .options is only used when type=radio: ng-switch-when="radio"
fields:
[
{
label: 'First Name',
name: 'firstname',
key: '',
type: 'text',
//fixa requierd i templatesen
required: true
},
{
label: 'Last Name',
name: 'lastname',
key: '',
required: true,
},
{
label: 'Email',
name: 'email',
key: '',
required: true,
type: 'email',
},
{
key: '',
type: 'radio',
labels:
[
{
name: 'media',
label: 'Media'
},
{
name: 'frilans',
label: 'Frilans'
}
],
}
],
},
<input type="radio" >{{mylabel.label}}?