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.
Comments
Post a Comment