2

I want to delay this pipe to return value only after 2 seconds.

What would be the idyllic way to delay such observable pipe.

export class StoragePipe implements PipeTransform {
    constructor(private afStorage: AngularFireStorage) { }
    transform(path: string): Observable<string> {
        if(path){
            return this.afStorage.ref(path).getDownloadURL();
       }

    }
}

I tried something like this return this.afStorage.ref(path).getDownloadURL().pipe(delay(2000)); That doesn't seem to work.

KENdi
  • 7,576
  • 2
  • 16
  • 31
LearnToday
  • 2,762
  • 9
  • 38
  • 67

0 Answers0