Does anyone have experience creating a group in ng-table?
<div>
<div ng-controller="ContractsController" style="position: relative;background:whitesmoke; border:1px solid lightgray; border-radius:5px; margin-top:0px; margin-bottom:5px; height:330px;">
<button prevent-default ng-click="tableParams.sorting({});tableParams.filter({});" class="btn btn-deufol btn-sm pull-right" style="width:150px;margin: 2px;"><span class="glyphicon glyphicon-th"></span> Show All</button>
<div style="margin-top: 6px;">
Group by:
<select ng-model="groupby" style=" font-weight:bold;">
<option value="vPPickUp" label="Picked Up">Picked Up</option>
<option value="vsHier1" label="Order Number">Order Number</option>
<option value="lastModifiedDate" label="Edited On">Edited On</option>
<option value="orderNo" label="Order Number">Order Number</option>
<option value="locationName" label="Location">Location</option>
<option value="stateId" label="Status Box">Status Box</option>
<option value="vPReadyForDispatch" label="Ready for Dispatch">Ready for Dispatch</option>
<option value="vPADate" label="VPA Creation Date">VPA Creation Date</option>
</select>
</div>
<div id=container" class="scrollable-area table-responsive" style="position:relative;background:whitesmoke; margin-top:0px; margin-bottom:0px; height: 294px;">
<%-- Should actually display an animation... --%>
<div class="alert alert-info" ng-show="loading" style="text-align:center;">Loading Data ...</div>
<table class="table" ng-table="tableParams" show-filter="true" fixed-table-headers>
<tbody ng-repeat="group in $groups">
<tr class="ng-table-group">
<td colspan="{{$columns.length}}">
<a href="" ng-click="group.$hideRows = !group.$hideRows" style="color:#3D3D3D;">
<span class="glyphicon" ng-class="{ 'glyphicon-chevron-right': group.$hideRows, 'glyphicon-chevron-down': !group.$hideRows }"></span>
<strong>{{ group.label }} {{ group.value }}</strong>
</a>
</td>
</tr>
<tr ng-hide="group.$hideRows" ng-repeat="data in group.data"
ng-click="loadSingleView(data.vsHier1, data.vsHier2, data.kolliNoIntern); setSelected(data.id)" ng-class="{{selected}}">
</tr>
</tbody>
</table>
</div>
</div>
</div>
In this method, AngularJS only displays the group by value. Is there a way to also show the group itself?
For example: If I group by a date, Angular shows the group as "01.12.2014", "02.12.2014" ....
What I want: "VPA Creation Date: 01.12.2014"
If you have any tips or solutions, please share them.