UNPKG

@smartangels/button-group-select

Version:

Adds a button group for selection

24 lines (22 loc) 861 B
<div class="sa-form_buttons-group"> <input ng-repeat-start="choice in choices" ng-init="identifier = name + '_' + choice.value" type="radio" name="{[ identifier ]}" id="{[ identifier ]}" ng-model="$parent.picked" ng-value="choice.value" ng-disabled="choice.disabled" class="sa-form_buttons-group_input"/> <label ng-repeat-end for="{[ identifier ]}" class="sa-form_buttons-group_button" ng-class="{'--disabled': choice.disabled}"> {[ choice.label ]} </label> </div> <select ng-options="choice.value as choice.label disable when choice.disabled for choice in choices" ng-model="picked" class="sa-form_select --buttons-group-responsive" > <option value="">Veuillez sélectionner</option> </select>