iominh / ng-scrollbars

Angular wrapper of Malihu's jQuery Custom Scrollbar
http://iominh.github.io/ng-scrollbars/
MIT License
202 stars 62 forks source link

Configuration not working #26

Closed silverrajat88 closed 8 years ago

silverrajat88 commented 8 years ago

configuration is not working. I saw a closed issue, which addressed the same problem but I have done everything by the book. Are more people facing this problem?

Please help.

silverrajat88 commented 8 years ago

HTML: <div class="chat-box" ng-scrollbars ng-scrollbars-config="config" ng-mouseenter="mouseEnterChat()" ng-mouseleave="mouseLeaveChat()">

CONTROLLER JS

  $scope.config = {
      callbacks:{
        onTotalScroll:function () {
          console.log("Scrolled to end of content.");
        }
      }
    };

this is the code that I wrote. It seems the directive is not able to process the passed config. Any help will be appreciated.

silverrajat88 commented 8 years ago

Removing this issue, as I my $scope.config was getting initialized after the link function of the ng-scrollbars executed, and therefore the problem. It would be great if the owner IOMINH can accommodate dynamic changes to the config object.

iominh commented 8 years ago

Hi @silverrajat88! Thanks for submitting the issue! @adalekin submitted PR25, which may solve your problem.

I'll be rolling out release 0.0.9 in the near future but in the meantime the master branch code has these changes so you can try it out to see if it helps

silverrajat88 commented 8 years ago

@iominh Thanks! :)