I am here in a tightening, I am using firebase v3.2.1 and trying to implement an infinity Scroll with ionic, the issue is that I do not know how to do it, I searched google and found a firebaseUtils library but it is not compatible with new version of firebase. so I would appreciate it if you could give me a help, because I've been trying to solve this for 3 days. My service is like this.
angular.module('app').factory('artigoService', artigoService);
artigoService.$inject = ['$firebaseObject', '$firebaseArray'];
function artigoService($firebaseObject, $firebaseArray) {
var rootrEF = firebase.database().ref().child('constituicao');
var object = $firebaseObject(rootrEF);
var array = $firebaseArray(rootrEF);
return {
getArray: getArray,
getObject: getObject,
getAll: getAll,
getByArtigo: getByArtigo
}
function getArray() {
return array.$loaded();
}
function getObject() {
return object.$loaded();
}
function getAll() {
return object;
}
function getByArtigo() {
var query = rootrEF.orderByChild("artigo").limitToLast(2);
return $firebaseArray(query);
}
}