SHARE
TWEET

Untitled

a guest Jan 21st, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. filterBreweries() {
  2.     if (this.numberOfViewsFilter && this.breweryNameFilter) {
  3.         this.breweryListQueryRef = this.db.collection('breweries').where('views', '>=', this.numberOfViewsFilter).where('name', '==', this.breweryNameFilter);
  4.     }
  5.     else if (this.numberOfViewsFilter) {
  6.         this.breweryListQueryRef = this.db.collection('breweries').where('views', '>=', this.numberOfViewsFilter);
  7.     }
  8.     else if (this.breweryNameFilter) {
  9.         this.breweryListQueryRef = this.db.collection('breweries').where('name', '==', this.breweryNameFilter);
  10.     }
  11.     else {
  12.         this.breweryListQueryRef = this.db.collection('breweries');
  13.     }
  14.     this.listenToRefSnapshot();
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top