What I am working on is to perform sort operation in a table on a single or multiple columns. Let's assume that we have a table like this.

[![enter image description here](https://i.stack.imgur.com/F4BJ6.png)](https://i.stack.imgur.com/F4BJ6.png)

On clicking on Heading 1 only the Data 1 and Data 2 should be sorted when clicking on the Heading 2 the Data 3 and Data 4 need to be sorted.

Have implemented simple sort for the table in Angular, but cannot get an idea how to implement this one with two sets of data in a single column. 

Even tried separate tables since the order by in Angular is based on the key in the array, both(Data 1,2,3 & 4) are getting updated when clicking on the Heading 1.

ng-repeat is used to form the table

Can anyone point me in the right direction(on Angular 1.x)?

`Sample Fiddle` <http://jsfiddle.net/ANEA6/13/>