AngularJS table creation for dynamic number of columns

<head>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <script src="js/bootstrap.bundle.min.js"></script>
    <script src="js/angular.min.js"></script>
</head>

<body ng-app="myApp">
<div ng-controller="MyCtrl">
    <div class="table-responsive" id="table1">
        <table class="table table-sm table-hover">
            <thead class="thead-light">
                <tr>
                    <th ng-repeat="column in cols">{{column}}</th>
                </tr>
            </thead>
            <tr ng-repeat="row in rows">
                <td ng-repeat="column in cols">{{row[column]}}</td>
            </tr>
        </table>
    </div>
</div>
</body>


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

function MyCtrl($scope) {
    $scope.rows = [
    {
        "#": "1", 
        "name": "aa", 
        "score": "3.8"
    }, 
    {
        "#": "2", 
        "name": "bb", 
        "score": "4.0"
    }, 
    {
        "#": "3", 
        "name": "cc", 
        "score": "3.6"
    }];
    $scope.cols = Object.keys($scope.rows[0]);
}

Reference