AngularJS Live Example
HTML
<script src="http://docs-next.angularjs.org/angular-0.10.1.min.js" ng:autobind></script>
<!-- AngularJS Example Code: -->
<script>
function Cntl(){
this.list = [
{name:'l1', items:['a','b','c']},
{name:'l2', items:['x','y','z']},
]
this.select1 = this.list[0];
this.$watch('select1', function(scope, value){
scope.select2 = value.items[0];
});
}
</script>
<div ng:controller="Cntl">
<select name="select1" ng:options="i.name for i in list"></select>
<hr/>
<select name="select2" ng:options="i for i in select1.items"></select>
<hr/>
<pre>
select1 = {{select1}}
select2 = {{select2}}
</pre>
</div>
CSS
body { font-family: Arial,Helvetica,sans-serif; }
body, td, th { font-size: 14px; margin: 0; }
table { border-collapse: separate; border-spacing: 2px; display: table; margin-bottom: 0; margin-top: 0; -moz-box-sizing: border-box; text-indent: 0; }
a:link, a:visited, a:hover { color: #5D6DB6; text-decoration: none; }