Skip to content

Tag: try-catch

capture error from catchError – http.post

component which is calling submitUser Here is the service file with submitUser function and here is the httpService Post and handleError methods handleError adisplays the console error, I am trying to return/capture this error in my submitUser function in service.ts How do i do that ? Any Inputs appreciated, …

Try catch on v if

I have a v-if that shows an error message in HTML if I set in data showError: true it appears. But when I call it in inside my catch: the alert works fine but if I send or do not appears the error message in HTML(v-if) how do i do that? Answer You need to set the member to true