Reverse scroll direction with 180 flipped scroll list

后端 未结 1 1432
无人共我
无人共我 2021-01-15 22:21

I\'m building a ionic / angular app and I\'m in a situation that I would like to reverse the scroll direction on scroll input.

Here jou can find a example of my sit

相关标签:
1条回答
  • 2021-01-15 23:00

    Here is an updated jsfiddle

    Instead of using CSS to reverse the list, i used a custom filter :

    app.filter('reverse', function() {
      return function(items) {
        return items.slice().reverse();
      };
    });
    

    and applied it to the ng-repeat list.

    ng-repeat="item in main.items | reverse"
    

    The list is just visually reversed and not the divs. Thx to that you don't have to hack the scroll

    0 讨论(0)
提交回复
热议问题