0

I am trying to make Html table using ng-repeat in angularjs. I want my table to update and add new rows into it as data changes in my $scope.variable. I tried something like -

<table class="table table-striped">
                <tr>
                    <th>User Name</th>
                    <th>Audio Status</th>
                    <th>Video Status</th>
                    
                </tr>
                <tbody>
                <tr ng-repeat="d in memberData track by d.id">
                    <td>{{d.name}}</td>
                    <td>{{d.audio_muted}}</td>
                    <td>{{d.video_muted}}</td>
                </tr>
                </tbody>
            </table>

Angular Code -

$scope.onMemberListUpdate=(members)=>{
            $scope.memberData = members;
            $scope.$apply();
        }
 //Calling onMemberListUpdate() somewhere
 $scope.onMemberListUpdate(members);

Issue - When data changes in $scope.memberData it is not updating table. How can I make it update automatically without refresh

Amara
  • 269
  • 11

0 Answers0