Hi there, I am trying to build my first app with Angular after watching this video on YouTube <https://www.youtube.com/watch?v=i9MHigUZKEM>. Here you can see it <http://test.misterunknown.de/angullary/test/#/>. Now I want to implement "infinite scrolling", but it does not work. This is what I have coded yet:
Javascript (http://test.misterunknown.de/angullary/test/js/directives.js) var myDirectives = {}; myDirectives.mdscrolled = function() { return { link: function(scope, elm, attr) { var raw = elm[0]; elm.bind('scroll', function() { console.log("in scroll"); if(raw.scrollTop + raw.offsetHeight >= raw.scrollHeight) scope.$apply(attr.mdscrolled); }); } } }; Later I add this directive to my module using: wtflol.directive(myDirectives); HTML <div id="grid" mdscrolled="loadMore()"> <div data-ng-repeat="pic in pics" style="background-image: url('{{ pic.filename }}');" class="{{ pic.format }}" data-ng-click="go('/singlePic/'+pic.uid)"> </div></div> Unfortunately this does not work. As you see, the binding function should log a status message in the console (red highlighted), but this does not happen. Can you help me with this? Cheers, Marco -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
