不显示在桌子上的手

时间:2019-05-13 09:57:14

标签: angularjs handsontable

因此,我必须以动手可操作表/热表的形式显示一些数据。 它没有显示在浏览器中。尚未创建。

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']
            };
        }

我的Obj,即在控制台上打印的$ scope.db:

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 个答案:

没有答案