explicitlytellAngulartotrustthisvalue:this.dangerousUrl='javascript:alert("Hithere")';this.trustedUrl=sanitizer.bypassSecurityTrustUrl