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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -