Created
May 11, 2020 16:49
-
-
Save coderkan/e20ed6945fcc1657e32a424f07b0d9d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (url.match(/\/employes\/.*/) && method === "DELETE") { | |
const empId = this.getEmployeeId(url); | |
return of(new HttpResponse({ status: 200, body: empId })).pipe( | |
delay(500) | |
); | |
} | |
getEmployeeId(url: any) { | |
const urlValues = url.split("/"); | |
return urlValues[urlValues.length - 1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment