1

On button click need to get the dropdown values of each row dont know where the issue is not success in retrieving,the controller goes here,

 $scope.values = [];
 $scope.Benifit = [{ 'BenefitType': ""},{ 'BenefitType': ""}];

 $scope.saveAllValues = function () {
       alert($scope.values);
 }

HTML

<div ng-repeat="item in Benifit">

                                    <select class="form-control-sm col-md-9" ng-modal="values[$index]">
                                        <option value="">Select</option>
                                        <option value="a">a</option>
                                        <option value="b">b</option>
                                        <option value="c">c</option>
                                        <option value="d">d</option>
                                        <option value="e">e</option>
                                    </select>
                                </div>
                            </div>
                            <button type="button" ng-click="saveAllValues()">Save</button>

Here check out the fiddle

3
  • Your question is not clear. Can you create a small demo for this using jsfiddle or snippet here to show the issue happening. Commented May 27, 2020 at 12:28
  • @palaѕн have updated and added the fiddle will you help out Commented May 27, 2020 at 13:06
  • 1
    You have a typo: Its ng-model not ng-modal Commented May 27, 2020 at 13:15

1 Answer 1

0

There is a typo on your select change ng-modal with ng-model.

<select class="form-control-sm col-md-9" ng-model="values[$index]">
    <option value="">Select</option>
    <option value="a">a</option>
    <option value="b">b</option>
    <option value="c">c</option>
    <option value="d">d</option>
    <option value="e">e</option>
</select>

Updated Fiddle

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.