使用 angularfire2 从存储中下载列表
Download a list from storage with angularfire2
我可以在 firebase 中成功保存文档。
我现在想显示特定存储文件夹中包含的所有文档
但文档只说明了如何获取特定文档:
@Component({
selector: 'app-root',
template: `<img [src]="profileUrl | async" />`
})
export class AppComponent {
profileUrl: Observable<string | null>;
constructor(private storage: AngularFireStorage) {
const ref = this.storage.ref('users/davideast.jpg');
this.profileUrl = ref.getDownloadURL();
}
}
最后,我将 link 文档保存在我的数据库中以重试信息。
SaveDoc() {
const Patientid = this.patientid;
const name = Date.now().toString();
const newDoc = new Doc(name, Patientid, this.url);
console.log(this.url);
this.docsService.CreatePpsDoc(newDoc);
}
我可以在 firebase 中成功保存文档。
我现在想显示特定存储文件夹中包含的所有文档
但文档只说明了如何获取特定文档:
@Component({
selector: 'app-root',
template: `<img [src]="profileUrl | async" />`
})
export class AppComponent {
profileUrl: Observable<string | null>;
constructor(private storage: AngularFireStorage) {
const ref = this.storage.ref('users/davideast.jpg');
this.profileUrl = ref.getDownloadURL();
}
}
最后,我将 link 文档保存在我的数据库中以重试信息。
SaveDoc() {
const Patientid = this.patientid;
const name = Date.now().toString();
const newDoc = new Doc(name, Patientid, this.url);
console.log(this.url);
this.docsService.CreatePpsDoc(newDoc);
}