Skip to content

Instantly share code, notes, and snippets.

@stankusl
Created October 26, 2016 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stankusl/9342f31e30049cc47934b7af0c3a0bec to your computer and use it in GitHub Desktop.
Save stankusl/9342f31e30049cc47934b7af0c3a0bec to your computer and use it in GitHub Desktop.
// Use Case:
// Get all values from API. Loop thru collection and provided control with value.
<div class="btn-group" data-toggle="buttons">
<label ng-repeat="cover in Benefit.availableCovers track by $index" class="btn btn-default-outline large-button-switch {{ Benefit.BenefitData.benefit_cover_type_id == $index ? 'active' : null }}">
<input
ng-click="Benefit.BenefitData.benefit_cover_type_id = $index"
type="checkbox"
name="benefit-renewal"
ng-model="Benefit.BenefitData.benefit_cover_type_id"
value="$index"> {{ cover.name }}
</label>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment