Material: External url for md-svg-icon is not allowed

Created on 6 Jun 2016  路  3Comments  路  Source: angular/material

After this commit, when using '$mdIconProvider' with an external url like 'https://az123456.vo.msecdn.net/icon.svg' angular throw an exception because the url is not trusted and not allowed

  • Angular Version: 1.5.6
  • Angular Material Version: 1.1.0-rc.5
important Pull Request docs

Most helpful comment

@DevVersion - please add ^ as doc additions to the mdIcon service.

All 3 comments

Not sure this is a bug. You should be able to trust your external URL

$sceDelegateProvider.resourceUrlWhitelist([
  // Allow same origin resource loads.
  'self',
  // Allow loading from our assets domain.  Notice the difference between * and **.
  'http://srv*.assets.example.com/**'
]);

Sure! i'm sorry.. now it work without problems.
I did not know the whitelist of angular delegate provider

Thank you!

@DevVersion - please add ^ as doc additions to the mdIcon service.

Was this page helpful?
0 / 5 - 0 ratings