I'm working with a dropdown that is connected to a user object structured like this:
{
userId:1,
userLogin:"test",
locale: { localeCode:"en-US" }
}
This structure originates from a C# model class where User and Locale are associated classes (User has one Locale).
My goal is to set up the dropdown without resorting to custom logic such as special serialization methods or adding $watch to a "UI" attribute in order to update locale.localeCode in the background.
<select id="dropLocale" required="required" addempty="true"
ng-model="user.locale.localeCode"
ng-options="i.localeCode as i.localeCode for i in localeList"></select>
Any assistance on this matter would be greatly appreciated. Thank you!