1

I want to use protocols like whatsapp:// and fb-messenger:// in my angular app to open those apps on mobile devices.

In older AngularJS code, I could use $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|fb-messenger|whatsapp):/); in the config() block of my app to whitelist those protocols.

When I look for a solution in Angular, I can only find solutions to override the security for a specific url (eg. How can I avoid adding prefix “unsafe” to a link by Angular 2? )

Is there a way in Angular 9+ to whitelist extra protocols globally?

bits
  • 672
  • 2
  • 7
  • 26

0 Answers0