ng-options filter by value in another dropdown

前端 未结 1 446
甜味超标
甜味超标 2021-01-20 07:07

This seems to be a really straight forward code, but I cannot figure out why it is not working.

I want to filter the \'model\' dropdown by selected \'make\',

相关标签:
1条回答
  • 2021-01-20 07:37

    Problem is with your first ngoption, you need to set the model as the value of value property using select as syntax option.value as option..

    <select ng-model="makeng" 
           ng-options="option.value as option.display for option in makes">
    

    Plnkr

    0 讨论(0)
提交回复
热议问题