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

Error in using example #45

Closed Rafi993 closed 7 years ago

Rafi993 commented 7 years ago

When I did bower install and I installed jquery using bower too . I get the following error


angular.js:13920 TypeError: c.mCustomScrollbar is not a function
    at b (http://localhost:3000/bower_components/ng-scrollbars/dist/scrollbars.min.js:1:288)
    at Object.link (http://localhost:3000/bower_components/ng-scrollbars/dist/scrollbars.min.js:1:912)
    at http://localhost:3000/bower_components/angular/angular.min.js:16:71
    at http://localhost:3000/bower_components/angular/angular.min.js:81:33
    at la (http://localhost:3000/bower_components/angular/angular.min.js:81:90)
    at p (http://localhost:3000/bower_components/angular/angular.min.js:66:341)
    at g (http://localhost:3000/bower_components/angular/angular.min.js:58:481)
    at http://localhost:3000/bower_components/angular/angular.min.js:58:119
    at http://localhost:3000/bower_components/angular/angular.min.js:63:39
    at d (http://localhost:3000/bower_components/angular/angular.min.js:59:474) <tr ng-scrollbars="" ng-scrollbars-config="specsctrl.config" ng-repeat="spec in specsctrl.dat" class="ng-scope ng-isolate-scope" data-ng-animate="1">

How to solve this issue thanks in advance

while-loop commented 7 years ago

Also getting the same error.

alannsiqueira commented 7 years ago

Also getting the same error. [2]

katerynajeeva commented 7 years ago

I was getting the same error too, but it dissapeared after I moved 'jquery.js' and 'mCustomScrollbar.js' scripts before 'angular.js'

<script src="/js/jquery-2.2.4.min.js"></script>
<script src="/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="/js/angular.min.js"></script>
<script src="/js/scrollbars.min.js"></script>
Rafi993 commented 7 years ago

thanks @kate-kholyavkina it worked for me to. I guess it should have been specified in README.md I have given pull request specifying it in README.md so that it would be helpful to others

iominh commented 7 years ago

Hey all thanks for the pr, comments, and fix! Currently I'm away but once I get back I'll try to reproduce the issue and do the update

flaviorodrigues1977 commented 7 years ago

Friends, I followed the tip of our friend Kate-kholyavkina and it worked perfectly!

csimpi commented 7 years ago

ahh :( I can't use this plugin with this odd requirement about script files initialize order.

Sharique-Hasan commented 7 years ago

How do I use the trick of @kate-kholyavkina with Webpack?