angularjs - How to use ngoption to list all city for a state from the given JSON object -


$rootscope.states = [{state : 'chhattisgarh',                       city : ['raipur', 'bhilai', 'bilaspur', 'raigarh', 'korba', 'jagdalpur']},                      {state : 'orissa',                       city : ['anugul', 'bhubaneshwar', 'cuttack', 'jharsuguda', 'sambalpur', 'rourkela']}]; 

i want use 1 selector group states

one thing note ngmodel required ngoptions work.

check http://plnkr.co/edit/sts6lvtqmjofkikykfyd?p=preview


Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -