Chips test

by Kunal Paul

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-smart-table/2.1.8/smart-table.js"></script>
<body ng-app="myApp">
  <div ng-controller="myCtrl">
      <div class="table-container">
        <table st-table="rowCollection" class="table">
        <thead>
          <tr>
            <th st-sort="firstName">ID</th>
            <th st-sort="lastName">Title</th>
          </tr>
        </thead>
        <tbody>
          <tr  st-select-row="row" st-select-mode="multiple" ng-repeat="row in rowCollection" ng-click="doSomeStuffToSelected(row)">
    <td>{{row[0]}}</td>
    <td>{{row[1]}}</td>
  </tr>
        </tbody>
      </table>
    </div>
  </div>
  
</body>

CSS

.st-selected{
  background: #216eff !important;
  color: white !important;
  }

JavaScript

var app = angular.module('myApp', ['smart-table']);
app.controller('myCtrl',function($scope,$filter){
	 $scope.isLoading = false;
            $scope.checkedData = [];
                    $scope.rowCollection = [["2017032517580346","HA Group Notification (WEEKLY_LOG) NOTICE"],
["2017031818200373","HA Group Notification (WEEKLY_LOG) NOTICE"],
["2017031818200372","HA Group Notification (WEEKLY_LOG) NOTICE"]];

                    $scope.doSomeStuffToSelected = function(val) {
                      console.log(JSON.stringify(val));
                    };
});