Rework custom submit directive for ng-repeat