Hands On Table Isn't Displayed

Asked by At

So, i have to display some data in the form of handsontable / hot-table. It is not being displayed in the browser. It is not being created.

HTML :

<hot-table
      settings="{{settings}}"
      row-headers="rowHeaders"
      min-spare-rows="minSpareRows"
      datarows="db"
      height="900"
      width="1000">
      <hot-column data="db.flag" title="Flag" width="185" ></hot-column>
    <hot-column data="db.currencyCode"  title="Currency"  width="185"></hot-column>
  </hot-table>

JS :

 $scope.copypaste = function() {
            $scope.minSpareRows = 1;
            $scope.db = [];
            $scope.rowHeaders = false;
           // $scope.appId = appId;
            $scope.db = dataFactory.generateArrayOfObjects($scope.dataObject);
            $scope.settings = {
                colHeaders: true, 
                minSpareRows:1,
                contextMenu: ['row_above', 'row_below', 'remove_row']
            };
        }

My Obj, that is $scope.db that gets printed on the console:

0: {flag: "EUR", currencyCode: "EUR"}
1: {flag: "JPY", currencyCode: "JPY"}
2: {flag: "GBP", currencyCode: "GBP"}
3: {flag: "CHF", currencyCode: "CHF"}
4: {flag: "CAD", currencyCode: "CAD"}
5: {flag: "AUD", currencyCode: "AUD"}

0 Answers