I'm making frontend with Angular and backend with rails.
I have a function to render pdf and return url of it.
PDF is populated in format of /public/rendered/*.pdf
.
After I make the pdf I call a function called openInNewTab
window.open(response.data["path"].split("/")[1]);
However, it is giving me an error saying
No route matches [GET] "/public/rednered/8-64dde64b-5548-4596-96a0-27b11ca51e2e.pdf"
I confirm that the pdf file exists. How do I show a pdf file in new tab?