Here is a user json object data:
var users = [
{
firstName: 'Sven',
lastName: 'Butzbak',
userID: '1', // TODO refactor to _id
gender: 'male',
avatar: 'imageurl',
notice: 'Fast fertig mit Theorie',
'types': [
{
'type': 'am',
'title': 'AM',
'icon': 'am',
'minAge': '16 Jahre',
'include-classes': 'keine',
'check': [
{
'id': '1',
'name': 'Motor anlassen',
'value': 'false'
},
{
'id': '2',
'name': 'Los fahren',
'value': 'true'
},
...
],
...
},
...
],
'events': [
{
'id': 1,
'name': 'Fahrstunde',
'date': '26.07.2016',
'time': '08:45'
},
...
]
}
];
Below is the code snippet for repeating the Check:
<ul class="user-progress check" ng-repeat="types in user.types">
<fieldset class="standard">
<legend>Fragen</legend>
<li ng-repeat="cat in types.check">
<div>{{cat.name}}</div>
<div>
<md-checkbox ng-model="cat.value">
{{cat.value}}
</md-checkbox>
</div>
</li>
</fieldset>
</ul>
For reference, I found a working example on the Angular Material Website: http://codepen.io/BamiGorengo/pen/KrGQEw
After some trial and error, I attempted to modify my userService:
$scope.types.check.value = {};
However, this did not solve the issue. As I am not proficient in JavaScript, I struggled to find a solution...