Use ng-if instead of show/hide
Reject request in case of error and not clear data