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

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -