let peopleListDiv: HTMLElement = document.querySelector("#people")!; var pageSize: number = 100; var pageNum: number = (1 * pageSize) - 1; document.addEventListener('DOMContentLoaded', function() { try { // @ts-ignore let firebaseApp= firebase.app(); } catch (e) { console.error(e); } // @ts-ignore const firebaseDb = firebase.database(); var rootDatabaseReference = firebaseDb.ref('/').orderByChild("lastName").startAt(pageNum).limitToFirst(pageSize); rootDatabaseReference.once('value', function(databaseSnapshot: any[]) { console.debug(databaseSnapshot) databaseSnapshot.forEach(function(snapshotEntry) { console.debug(snapshotEntry) var snapshotEntryValue = snapshotEntry.val(); console.debug(snapshotEntryValue) peopleListDiv.innerHTML += `
not yet

${snapshotEntryValue.firstName} ${snapshotEntryValue.lastName}

Gender:

${snapshotEntryValue.gender}

Age:

${snapshotEntryValue.age}

Current Country of Residence:

${snapshotEntryValue.country}

Job:

${snapshotEntryValue.job}

Bio:

${snapshotEntryValue.bio}

`; }) }) })