I am trying to render base64 string into .
But always when I try to render it, ng2 sanitizing my base64 str
You need to explicitly tell Angular2 that the string is trusted
https://angular.io/docs/ts/latest/api/platform-browser/index/DomSanitizer-class.html
constructor(private sanitizer:DomSanitizer) {}
get imgBase64() {
this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,$SomeBase64StringFetchedSomehow');
}
See also In RC.1 some styles can't be added using binding syntax