nested ng-repeat

update nested ng-repeat

by Osama Qassar

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"></script>


<div ng-app="myApp" ng-controller="VibrationCtrl">
  <table>
    <tr ng-repeat="Row in Mi">
      <td ng-repeat="I in Row track by $index">
        {{I}}
      </td>
    </tr>
  </table>
  <button ng-click="aaa()">asd</button>
  {{Mi}}
</div>


<script>
var myApp = angular.module('myApp', []);

function VibrationCtrl($scope) {
  $scope.Mi = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
  ];
  $scope.aaa = function(){
    $scope.Mi = [
      [1, 1, 1],
      [4, 5, 6],
      [7, 8, 9]
    ];
  }
}

myApp.controller('VibrationCtrl', VibrationCtrl);

</script>