Use sanitizer in non-angular img src

-1

I'm getting a sanitizer warning img src, I'm trying to use the angular sanitizer service, but I get:

  

Got interpolation ({{}}) where expression was expected

I tried:

<img [src]="sanitizer.bypassSecurityTrustResourceUrl({{m.foto}})">

import { DomSanitizer } from '@angular/platform-browser';

  constructor(
    public sanitizer: DomSanitizer
    ) {}

How can I use sanitizer with interpolation? because my target is an item being iterated in ngfor

    
asked by anonymous 29.12.2018 / 00:00

0 answers