答案 0 :(得分:0)
您需要向ng-model
添加<select>
:
<div class="container jumbotron">
<div class="col-md-12">
<select ng-model="selectedOption">
<option ng-repeat="option in options" name="chosenOption">
{{ option.name }}
</option>
</select>
</div>
<div ng-show="selectedOption.name == 'Pool'" ng-include="'new-pool.html'"></div>
</div>
然后,选择中的ng-model
将设置为当前选定的对象。