javascript - angular - Edit raddiobutton values in textarea -
i popover retrieve values of radiobuttons in lines in textarea , after saving make necessary change.
<div ng-repeat="controle in dataform.controles" ng-switch on="controle.tipo"> <div ng-switch-when="radio" class="kahiar-block"> <div id="cmp_{{controle.codcontrole}}" class="campos form-group disabled col-md-6 animated bounceinright " ng-controller="controleditctrl" popover-placement="top" uib-popover-template="dynamicpopover.templateurl" popover-title="editar controle"> <div class="conteudo-campo"> <label data-id="lbl{{controle.codcontrole}}" class="label-titulo"></label> <div class="input-group"> <label class="checkbox-inline" id="div_{{$index}}" ng-repeat="item in controle.opcoes track $index" name="{{item.codcontrole}}"> <input id="radio_{{$index}}" icheck type="radio" ng-value="item" ng-model="$parent.dataform[controle.nome]"> {{item}} </label> </div> </div> </div> </div> </div> <script type="text/ng-template" id="mypopovertemplate.html"> <div class="form-group"> <label>opções</label> <textarea ng-model="controle.opcoes" class="form-control"> {{controle.opcoes.join("\n").trim()}} </textarea> </div> <button class="btn btn-primary">save</button> </script>
sample: http://bootsnipp.com/forms
Comments
Post a Comment