themyth92 / ngx-lightbox

Lightbox2 use with angular >= 5
MIT License
115 stars 70 forks source link

Insert a SanitizeURL in IAlbum #125

Closed Christian1626 closed 2 years ago

Christian1626 commented 2 years ago

Hi,

I'm trying to pass a sanitize blob url in my IAlbum, but src is wating for a string type. How can I manage to solve this problem ?

 let img: IAlbum = {
        src:  this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(blob)),
        caption: 'test'
        thumb: 'test'
      };
Christian1626 commented 2 years ago

Solved it by extending IAlbum:

interface IAlbum2 extends IAlbum {
  src: any;
}