Allow skype calls from Angular App (using meanjs)

I can’t get rid of a small problem affecting the functionality of my application in order to allow calling a phone number using skype, which I still have:

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 find an item to start a call, the browser shows this: unsafe:skype:012345678?calland does not allow me to call the number ...

I added a part of the configuration, looking at other issues related to similar problems, but this does not solve my problem.

EDIT : I am using meanjs.org

EDIT 2: , ... , Angular. , , meanjs.org . .

3: , : skype / , : /list, , unsafe. , : /list/1234, . , .

+6
3

"" ngFileUpload, , .

ngFileUpload .

.

+4

URL- Angular, . http, https, ftp mailto. Angular , chrome-extension:.

URL unsafe:.

chrome-extension: :

var app = angular.module( 'myApp', [] )
.config( [
    '$compileProvider',
    function( $compileProvider )
    {   
        $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension):/);
        // Angular before v1.2 uses $compileProvider.urlSanitizationWhitelist(...)
    }
]);

, , file: tel:.

. API- AngularJS $compileProvider.

0

I worked on the following plunger http://plnkr.co/edit/rIPFz9WhFjlRJ1ogCArP?p=preview

angular.module('plunker', [])

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

.controller('MainCtrl', function($scope) {
  $scope.href = 'skype:123456?call';
});
0
source

Source: https://habr.com/ru/post/1016599/


All Articles