My Rails app is generating a PDF file in a file system. When the user clicks "Preview" button in the front-end which is in Angular, it generates a PDF file and returns path.
def renderPDF()
 # PDF render codes
 STORAGE_PATH = 'public/rendered'
 return "#{STORAGE_PATH}/example.pdf"
end
In my front-end, I would like to open this PDF when the Preview button is clicked. How would I show the PDF file on the browser?
 
    