In my HTML i am using like:
<object #homes style="height:500px;width:1000px" data="{{homesPath}}"></object>
In TS:
constructor(
private homesProfileService: HomesProfileService,
private sanitizer: DomSanitizer) {}
this.homesPath = this.sanitizer.bypassSecurityTrustResourceUrl(
environment.homesPath
);
But it is giving Error:
Error: unsafe value used in a resource URL context (see http://g.co/ng/security#xss)
Is there anything wrong that i am doing.