Safari cannot open the page because the address is invalid in iOS

I want to open a specific chat in WhatsApp on clicking a chat bubble in my ionic-angular application. The functionality works fine in iOS if WhatsApp is installed. It will redirect to your WhatsApp application and opens the chat with number specified in this url “” + this.whatsAppNo + “&text=”. But if there is no WhatsApp it will open up your default browser ie Safari in iOS and then a pop up comes showing “Safari cannot open the page because the address is invalid”.



<ion-fab left middle class="whatsapp-share1">
    <a ion-fab color="gold" href="#" (click)="clickChat()"


clickChat() {
    let url =
      "" + this.whatsAppNo + "&text=";
    console.log("showUrl", url);
    this.inAppBrowser.create(url, "_system");

Another problem I found is if we try to open that url as a web view inside the application, then it won’t redirect to the WhatsApp application