getUserDetailsList() {
debugger;
post(this.baseURL +'/getUserDetailsList',this.errorHandler)
.toPromise()
.then(res =>this.list = res as UserDetails[]);
}
errorHandler(error: { error: { message: string; }; status: any; message: any; }) {
let errorMessage = '';
if(error.error instanceof ErrorEvent) {
errorMessage = error.error.message;
} else {
errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`;
return throwError(errorMessage);