I'm trying to display an array of properties in my view from Javascript but it's not displaying appropriately. It looks like this:
vm.statesList: [ObjectStateCode: "AL"StateId: 1 StateName: "Alabama"_backingStore: ObjectStateCode: "AL"StateId: 1StateName: "Alabama"__proto__: ObjectentityAspect: ctor__proto__: Object,]
But when i display it like this:
<select data-ng-model="cdModel.documentRequestData.RESIDENT_STATE"
ng-change="cdModel.documentChanged()"
ng-options="state as code for (code, state) in vm.statesList"></select>
Then it only displays the StateId instead of anything else. Whenever i reverse code and state so it's "state as code for (state, code) in vm.stateList" i cannot display anything, it's just a drop-down list of blanks (the correct # though!). It also doesn't display the properties through a repeat like this:
<tr ng-repeat="st in vm.statesList">
<td>Names:</td>
{{st.stateList.StateName}}
{{st.stateCode }}
{{ st.stateId }}
</tr>
My Question: How do i get the StateName's to display and have the StateCode be what gets used in the ng-options(returned)? Note: i'm not concerned w/ StateId AT ALL!