Having a frustrating time trying to figure this out. Trying to replace 3 checkboxes with a dropdown menu.
The checkboxes work perfectly. When you update the user, it provides the data for the database correctly and when you go back to edit again, it checks the correct box based on what you selected before. This is not the case for the dropdown menu. I cannot seem to get it to work. It doesn't automatically select the saved value in the dropdown and when I select a value in the dropdown and save, it doesn't get written to the database. I used all the info from the checkbox code so I am not sure why it won't work.
I like the simplicity of DROPDOWN v2.0, but I need to add text to the role.Id like in the checkbox and dropdown v1.0 code. Is that even possible inside ng-option?
CHECKBOX
<div ng-repeat="role in ctrl.userRoleEdits">
    <div class="checkbox checkbox-inline">
        <input id="role{{role.Id}}" type="checkbox" name="role{{role.Id}}" ng-model="role.Selected" />
        <label for="role{{role.Id}}" class="short">{{role.Name}}</label>
    </div>
</div>
DROPDOWN v1.0
<select class="form-control">
    <option ng-repeat="role in ctrl.userRoleEdits" id="role{{role.Id}}" name="role{{role.Id}}" ng-model="role.Selected">{{role.Name}}</option>
</select>
DROPDOWN v2.0
<select class="form-control" ng-model="role.Selected" ng-options="role as role.Name for role in ctrl.userRoleEdits track by role.Id"></select>

ctrl.userRoleEditsand setting 'Selected' to betrue/false. In your select, you're binding to a different modelrole.selectedwith the entire object ofctrl.userRoleEdits