0
<select multiple ng-model="comp" ng-options="c.name for c in companies | unique: 'company'" style="width: 100%; height: 200px; float: left; margin-bottom: 20px"></select>
<table>
<tr ng-repeat="c in comp">
<td>{{ c.id }}</td>
</tr>
</table>
<select multiple ng-model="dep" ng-options="c.name for c in departments | filter: {company_id: comp.id}" style="width: 100%; height: 200px; float: left; margin-bottom: 20px"></select>
<select multiple ng-model="pos" ng-options="c.name for c in positions | unique: 'position' | filter: {department_id: dep.id}" style="width: 100%; height: 200px; float: left"></select>
내 코드는 어떻게 생겼지 만 부분적으로 만 작동합니다. ng-repeat
을 통해 반복하면 선택 상자에서 회사를 클릭하면 c.id
이 잘 인쇄됩니다. 문제는 - 결과를 필터링하려는 다른 선택 상자에 인쇄되지 않습니다. 그 원인은 무엇일까요?AngularJS 체인 선택
JSFiddle : 문제는 comp
는 (선택) 회사가 아닌 한 회사의 목록입니다 사실로 인해 발생http://jsfiddle.net/9Ymvt/853/
피들에서 설명 할 수 있습니까? 여기 템플릿을 가져 가라 : http://jsfiddle.net/9Ymvt/852/ –
@ MaximShoustin ok here http://jsfiddle.net/9Ymvt/853/ 간다. – Xeen