0

I have a list of items, inside a div, with a ng-repeat angular directive. And I need this list, to use an automatic scrolling, it's a DEMO (it's, use the jquery super-treadmill). 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>
1
  • share what have you tried so far Commented May 4, 2017 at 13:17

1 Answer 1

1

you can do it with 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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.