moved directive specific logic to directive link from controller, apply ng-repeat on directives, move http request to factory