javascript remove - AngularJS changes URLs to “unsafe:” in extension page

angular2 href (6)

I am trying to use Angular with a list of apps, and each one is a link to see an app in more detail (apps/

<a id="{{}}" href="apps/{{}}" >{{}}</a>

Every time I click on one of these links, Chrome shows the URL as


Where does the unsafe: come from?


For Angular 2+ you can use DomSanitizer's bypassSecurityTrustResourceUrl method.

import {DomSanitizer} from '@angular/platform-browser';

class ExampleComponent {
    sanitizedURL : SafeResourceUrl;

        private sanitizer: DomSanitizer){
        this.sanitizedURL = this.sanitizer.bypassSecurityTrustResourceUrl(); 

<a href="{{applicant.resume}}" download> download resume</a>

var app = angular.module("myApp", []);

    app.config(['$compileProvider', function($compileProvider) {


In case anyone has this problem with images, as well:

app.config(['$compileProvider', function ($compileProvider) {

If you just need for mail, tel and sms use this:

app.config(['$compileProvider', function ($compileProvider) {

I wondered this myself for a while. Without setters how does AngularJS notice changes to the $scope object? Does it poll them?

What it actually does is this: Any "normal" place you modify the model was already called from the guts of AngularJS, so it automatically calls $apply for you after your code runs. Say your controller has a method that's hooked up to ng-click on some element. Because AngularJS wires the calling of that method together for you, it has a chance to do an $apply in the appropriate place. Likewise, for expressions that appear right in the views, those are executed by AngularJS so it does the $apply.

When the documentation talks about having to call $apply manually for code outside of AngularJS, it's talking about code which, when run, doesn't stem from AngularJS itself in the call stack.

javascript angularjs security google-chrome-extension