{"size": 1154, "ext": "js", "max_stars_repo_path": "app/commons/components/table/table.directive.js", "max_stars_repo_name": "nvasc/BCT_ORG", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/commons/components/table/table.directive.js", "max_issues_repo_name": "nvasc/BCT_ORG", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/commons/components/table/table.directive.js", "max_forks_repo_name": "nvasc/BCT_ORG", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.85, "max_line_length": 79, "alphanum_fraction": 0.5450606586}
import controller from './table.controller';
import './style.css';
import tableTemplate from './table.html';

function tableDirective() {
  return {
    restrict: 'EA',
    scope: {
      url: '@',
      tableData: '=', //table data will set by directive consumer
      columns: '=', // no need for named attributes
      theadTemplate: '=',
      colsBold: '=',
      //ciFilterObject: '=',
      //ciParamester: '='
    },
    template: function (element, attrs) {
      return `<table class="blueTable">
      <thead ng-bind-html="table.headerTemplete">
      </thead>
      <tbody>
        <tr ng-repeat="row in table.tableData track by $index" index={{index}}>
          <td  ng-repeat="col in table.columns">
            <span ng-class="[table.isNumber(row[col])==true?'formatright':'', 
            row['IsBold']==true?'formatbold':'',
            row['IsCenter']==true?'formatcenter':'', 
            colsBold[col] == 1?'formatbold':'']">
              {{ row[col] }}
            </span>
          </td>
        </tr>
      </tbody>
    </table>`;
    },
    controllerAs: 'table',
    controller: controller
  }
}
export default tableDirective;
