Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save krishnamurthypradeep/74fe0d244763fa332ac9 to your computer and use it in GitHub Desktop.

Select an option

Save krishnamurthypradeep/74fe0d244763fa332ac9 to your computer and use it in GitHub Desktop.
<div id="search-row0" class="row" ng-repeat="element in controller.search.list">
<div class="col-sm-4">
<select id="field0" class="form-control" ng-model="controller.search.list[element.index].name" required>
<option ng-repeat="field in controller.search.fields" ng-selected="field.name === 'ID'" value="{{field.value}}">{{field.name}}</option>
</select>
</div>
<div class="col-sm-4">
<select id="criteria0"
class="form-control"
ng-model="search.list[element.index].criteria"
required>
<option value="">- Criteria -</option>
<option
ng-repeat="criteria in controller.search.criterias | filter: { type: (controller.search.fields | filter: { value: controller.search.list[element.index].name })[0].type }"
value="{{criteria.value}}">
{{criteria.name}}
</option>
</select>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment