Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow skype calls from Angular App (using meanjs)

I can not get rid of a small issue affecting my app functionality to enable to call a phone number using skype, what I have so far is this:

HTML:

<a ng-href="skype:{{user.phone}}?call" class="btn btn-sm btn-success" type="button">{{user.phone}}</a>

ANGULAR

(function() {
  angular.module('core').config(coreConfig);

  coreConfig.$inject = ['$compileProvider'];

  function coreConfig($compileProvider) {
    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|file|skype):/);
  }
})();

The result is always the same, when I hover the element to start a call the browser show this: unsafe:skype:012345678?call and do not allow me to call the number...

I added the config part browsing other questions related to similar issues but it doesn't solve my issue.

EDIT: I'm using meanjs.org

EDIT 2: Please do not copy/paste my question code as your answer... I know that it work on a normal Angular application. The problem is that I can not let it work using meanjs.org app. Thanks.

EDIT 3: I just found that: if I use the skype link in the main root / or in a child root like: /list it work fine without adding the unsafe prefix. In a dynamic root like: /list/1234 it doesn't work anymore. I don't know if it could help.

like image 307
Ayeye Brazo Avatar asked Apr 18 '17 10:04

Ayeye Brazo


1 Answers

The "bug" was caused by an old version of ngFileUpload that overwrite my configuration as reported here.

Upgrading the version of ngFileUpload solved my issue.

Thanks for your help.

like image 177
Ayeye Brazo Avatar answered Oct 13 '22 00:10

Ayeye Brazo