Currently, I am working with Angular 2 using TypeScript. I have an input box in HTML that allows users to enter search terms, including REST resources like employee/getDetail.
I need to replace / with // to prevent my service from failing. Additionally, even if a user enters something like employee///////getDetail//////salary, it should translate to employee/getDetail/salary.
My idea is to replace multiple slashes with just two slashes. So, if a user enters more than 2 slashes, we will only keep 2.
Is there a way to escape these characters within the Angular UI itself?
Thank you, Ashish