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.