Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera uno-de-piera/afire.service.ts Secret
Last active May 26, 2018

What would you like to do?
import { Injectable } from '@angular/core';
import {AngularFirestore, DocumentChangeAction} from 'angularfire2/firestore';
providedIn: 'root'
export class AfireService {
private afs: AngularFirestore,
) {}
paginate (limit: number, last: string): Observable<DocumentChangeAction<any>[]> {
return this.afs.collection('todos', (ref) => (
.where('id', '<', last)
.orderBy('id', 'desc')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.