I got lots of projects :
export class Project {
$key: string;
file: File;
name: string;
title: string;
cat: string;
url: string;
progress: number;
createdAt: Date = new Date();
constructor(file: File) {
this.file = file;
}
}
I upload them all to :
uploads: Observable<Project[]>;
private saveFileData(upload: Project) {
this.db.list(`profile/${this.auth.userId}/project`).push(upload);
}
And then I am trying to get one :
uploads: Observable<Project[]>;
getOne(){
this.uploads = this.db.list(`profile/${this.auth.userId}/project/${this.projectId}`);
}
In this case I get error on this.uploads
(Angularfirelist is not assignable to Observable.)
Then I tried this :
uploads: AngularFireList<Project[]>;
getOne(){
this.uploads = this.db.list(`profile/${this.auth.userId}/project/${this.projectId}`);
}
Error :
ERROR Error: InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'
How to get that one project ?