I've been trying to query data on Firebase using querying lists.
When I attempt something analogous to what is described in that documentation:
getMatchesFiltered(matchId: string, filter: string, sortDirection: string, pageIndex: number, pageSize: number){
let queryObservable = this.db.list('/matches', ref => ref.orderByKey(true).limitToFirst(2));
return queryObservable;
}
I got an "Argument of type '{ query: { ...}; }' is not assignable to parameter of type 'FirebaseListFactoryOpts' " error, which led me to this helpful SO post. However, when I tried to change the above to
getMatchesFiltered(matchId: string, filter: string, sortDirection: string, pageIndex: number, pageSize: number): AngularFireList<Match[]>{
let queryObservable = this.db.list('/matches', ref => ref.orderByKey(true).limitToFirst(2).valueChanges());
return queryObservable;
}
and add AngularFireList to the 'angularfire2/database' imports, I get the following error:
ERROR in src/app/database.service.ts(7,81): error TS2305: Module '"/Users/mf/Desktop/dataJitsu/node_modules/angularfire2/database"' has no exported member 'AngularFireList'.
This suggests to me that perhaps I have an old version of angularfire2? Indeed, my package.json says,
"angularfire2": "^4.0.0-rc0",
And I believe that the new AngularFireList list stuff is from v. 5.x.x?
However, when I try to update, it doesn't let me. When I run npm outdated, this is what I see:
Note that the WANTED version of angularfire2 is still 4.0.0-rc0.
Which brings us finally to my question: How do I figure out which package(s) want my versions to stay where they are? In other words, what's holding me back from updating further? Alternatively, if anyone knows how to solve this problem on the angularfire2 front, I'm all ears for that, too.