You don't need to declare providers: [ DomSanitizer ]
anymore.
Just need to import
DomSanitizer
as shown below,
import { DomSanitizer, SafeResourceUrl, SafeUrl} from '@angular/platform-browser';
in component inject it through a constructor as below,
constructor(private sanitizer: DomSanitizer) {}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…