functionality for ng-repeat'