lundi 29 août 2022

Select Multiple values from checkboxes in Angular js and pass it to controller

I have array of object containing

vm.array = [
{key: 'text 1', value: 'false'},
{key: 'text 2', value: 'false'},
]

These values are being shown in the controller which is fine

           <div layout="column">
                    <div class="md-dense" layout="column" style="margin: 0px auto;">
                        <md-input-container ng-repeat="t in a.array" style="margin: -3px;">
                            <md-checkbox ng-model="t.value" aria-label="t.key">
                                
                            </md-checkbox>
                        </md-input-container>
                    </div>
                </div>

What I need is to let say a user selects the first check box and click a button so I could see the results whether which checkbox is selected and which in not selected.




Aucun commentaire:

Enregistrer un commentaire