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 += `
${snapshotEntryValue.gender}
${snapshotEntryValue.age}
${snapshotEntryValue.country}
${snapshotEntryValue.job}
${snapshotEntryValue.bio}