Closed adolfosrs closed 8 years ago
Also posted on StackOverflow: http://stackoverflow.com/questions/35665313/nginfinitescroll-resulting-in-typeerror-cannot-read-property-scroll-of-undefi
On Sat, Feb 27, 2016 at 2:18 PM Adolfo Schneider notifications@github.com wrote:
I'm working with Angular integrated to Firebase and I'm trying to achieve a infinite scrolling in my application.
So I'm struggling to use the ngInfiniteScroll in my page. Following this documentation http://firebase.github.io/firebase-util/#/toolbox/Paginate/example/ngInfiniteScroll I starting facing TypeError: Cannot read property 'Scroll' of undefined angular.js:13236 error message.
(function (angular) { "use strict";
var app = angular.module('myApp.baby', ['firebase', 'firebase.utils', 'firebase.auth', 'ngRoute', 'infinite-scroll']);
app.config(['$routeProvider', function($routeProvider) { $routeProvider.when('/:babyId', { templateUrl: 'baby/baby.html', controller: 'BabyController', }); }]);
app.controller('BabyController', ['$scope', 'Auth', 'fbutil', 'FBURL', '$location', '$firebaseObject', '$routeParams', '$firebaseArray', function($scope, Auth, fbutil, FBURL, $location, $firebaseObject, $routeParams, $firebaseArray) { $scope.FBURL = FBURL;
var unbind; var baby = $firebaseObject(fbutil.ref('babies', $routeParams.babyId)); baby.$bindTo($scope, 'baby').then(function(ub) { unbind = ub; }); var baseRef = new Firebase(FBURL).child("posts"); var scrollRef = new Firebase.util.Scroll(baseRef, 'number'); $scope.items = $firebaseArray(scrollRef); $scope.items.scroll = scrollRef.scroll; }
]);
})(angular);
posts.html
{{item.$id}}: {{item.number}}, {{item.string}}Any kind of help will be appreciated.
— Reply to this email directly or view it on GitHub https://github.com/firebase/firebase-util/issues/87.
@puf Is it a problem? Just making sure the community is aware of this.
The problem comes when we duplicate energy and time answering the same question that someone else is answering in another channel. Thus, it's respectful of the community's time to note if you cross post.
Ok, srry for that. Lets continue it in stackoverflow. Thanks
I'm working with Angular integrated with Firebase and I'm trying to achieve a infinite scrolling in my application.
So I'm struggling to use the ngInfiniteScroll in my page. Following this documentation I start facing
TypeError: Cannot read property 'Scroll' of undefined angular.js:13236
error message.posts.html
Any kind of help will be appreciated.