javascript - Select tag Json array elements -
so let's have following html:
<select ng-model="myctrl.getcargo().handler.cargo" ng-options="cg.name cg in myctrl.getcargo().handler.cg"> </select>
and cargo looks this:
this.cg = { cgcategory: "", cgname: "" }
both cg , cargo getting data external json object. it's worth noting while have same exact data , structure, cg , cargo separate arrays. selecting item select dropdown doesn't cause others disappear.
after lot of trial , error, got code work. however, want each item of select tag show both cargo's category, , given name. appreciated.
Comments
Post a Comment