Automatic scrolling of angled items

0

I have a list of items, inside a div, with the ng-repeat angular directive. And you need to use an automatic scrolling, similar to this DEMONSTRATION (it is, use the super-treadmill plugin of jquery). How can I do this with angular js (version 1.6)?

<div class="panel-body">
    <div ng-repeat="model in collection">
        <h1>{{model.name}}</h1>
        <p>{{model.description}}</p>
    </div>
</div>
    
asked by anonymous 04.05.2017 / 01:43

1 answer

0

I was able to solve by creating a simple directive

app.directive('startTreadmill', function(){
     return {
         link: function(scope, element, attr){
              $(element).startTreadmill({ direction: "down"});
         }
     }
})


<div class="panel-body" start-treadmill>
    <div ng-repeat="model in collection">
        <h1>{{model.name}}</h1>
        <p>{{model.description}}</p>
    </div>
</div>
    
04.05.2017 / 15:39