B
B
bumbay2014-09-30 07:27:40
JavaScript
bumbay, 2014-09-30 07:27:40

Problems loading information when scrolling up?

There is a problem.

Implemented loading messages when scrolling up. The problem is that when loading new information, the scroll remains at the very top, and not at the place where the download began.

How to solve the issue?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TekVanDo, 2014-09-30
@TekVanDo

alternatively use the directive by type

app.directive("topscroll", function($timeout){
    return {
        restrict: "A",
        scope:{
            watchdata:"="
        },
        link: function(scope,element){
            var el = element[0];

            function scrollToTop(){
                    element.ready(function () {
                        el.scrollTop = 0;
                    });
            }

            scope.$watch("watchdata",function(){
                scrollToTop();
            },true);
        }
    };
});

you can also try to use $anchorScroll but for this you will need to create them ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question