I've got the following problem while editing an existing CD with angular js. I want the dropdown to be selected to the current id from the ReleaseStudio of the cd.
<select ng-model="cd.ReleaseStudio.id">
<option ng-repeat="studio in studios" value="{{studio.id}}" >{{studio.name}}</option>
</select>
The code works. The option is bound to the cd.ReleaseStudio.id. But the current cd.ReleaseStudio.id isn't selected by default when I enter the edit screen. It sits on a blank line and I've to reselect the studio, even if I just want to edit the cd.name field.
I found multiple answers on stackoverflow saying it would go automatically, but none of them worked for me. Can somebody tell me what I'm doing wrong?
AngularJS - Set default value on select inside a ng-repeat Angular.js: Using ng-model for dropdowns within ng-repeat
Thanks in advance