I have a similar question to this post.
But adding "javascript" what was proposed in the answer didn't resolve my problem:
$compileProvider.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|javascript):/);
My code looks something like:
<a ng-href="{{var1 ? '/home' : 'javascript: void(0);'}}" ng-bind="var2"></a>
But in the url, it produces an unsafe:javascript: void(0);