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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -