I am getting the user details from a webservice.
Everything is fine except that the javascript is adding an unsafe attribute to the email Id field.
<div class="row">
<div class="col col-50">
<span class="input-label">Created By</span>
</div>
<div class="col col-50" style="color:white">
{{Idea.FirstName}} {{Idea.LastName}}
<a ng-href="sip:{{Idea.EmailId}}">
<i class="ion-ios-chatboxes-outline" style="font-size:2em;color:white"></i>
</a>
</div>
</div>
When I am hovering or clicking the chat icon, a message is shown in the corner: unsafe:sip:"EmailId"
ng-href
executes expression in context of scope. You don't need curly braces for it. So your code should be either
<a ng-href="'sip:'+Idea.EmailId">
or
<a href="sip:{{Idea.EmailId}}">
Angular is having normal url as href:mailto as whitelist. But few attribute need to loaded from the security point of view. To start an IM through angular we need to add sip to whitelist like this
var app = angular.module( 'myApp', [] )
.config( [
'$compileProvider',
function( $compileProvider )
{
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|sip|chrome-extension):/);
}
]);
It will add sip to whitelist and the Lync application will start when clicked in the Icon. This change is to be made in app.js.