Skip to content

Instantly share code, notes, and snippets.

View thekage91's full-sized avatar
👨‍💻
Breaking the walls

Davide thekage91

👨‍💻
Breaking the walls
View GitHub Profile

Keybase proof

I hereby claim:

  • I am thekage91 on github.
  • I am 00taffe (https://keybase.io/00taffe) on keybase.
  • I have a public key ASADowCcPsl7G61uzvs_JUTjewYdVxSe28uBCwFOy_IIdgo

To claim this, I am signing this object:

@thekage91
thekage91 / safe-pipe.ts
Last active March 2, 2020 15:35
Angular Pipe to trust safe url
import { Pipe, PipeTransform } from "@angular/core";
import { DomSanitizer, SafeUrl } from "@angular/platform-browser";
@Pipe({
name: 'safe'
})
export class SafePipe implements PipeTransform {
constructor(private sanitizer: DomSanitizer) { }
transform(url: string): SafeUrl {