Customize Alert Message: Show dynamic message in ionic 3/4 alert component

In one of my client’s projects, there was a situation where I wanted to update the alert message after a certain event but I was not aware of how to do it as it was not mentioned in the official ionic docs.

Open Documents in ionic 4 app : step by step Integration guide

So you have a remote url of a PDF file which is being shown in your page content. When the user clicks on it, by normal behaviour it will try to open up in an external browser or an in-app browser (if you have one integrated in your app). What we want is that, when user clicks on the link, it will download the file in background and open the file swiftly in the device’s default pdf reader.