jfcere / ngx-malihu-scrollbar

Angular 2+ scrollbar customization using Malihu jQuery Custom Scrollbar plugin
https://jfcere.github.io/ngx-malihu-scrollbar
MIT License
58 stars 17 forks source link

Require Update #39

Closed lovep34 closed 5 years ago

lovep34 commented 6 years ago

Can you please update so it will work with Angular 5 and 6, Also please setup the different demos and github projects for component approach, Service approach etc. Now it is little bit confusing.

jfcere commented 6 years ago

Last time I checked the library was working for both Angular 5 and 6 (you can see the demo of ngx-materialize that is using it for the sidenav and the project is in Angular 6).

Can you reproduce your problem in a StackBlitz ?

For the service approach, I am a little confused as it is documented in the README.md.

Do you have any specific question?

lovep34 commented 6 years ago

Hi @jfcere

That's good! I think this is little bit confusing as you have merged all approach in single project, I suggest you to create different project for every approach so it will be easy to understand.

I want to use Component approach.

Thanks

lovep34 commented 6 years ago

Hi @jfcere ,

I have installed both dependencies and embed the code in .ts and HTML file, everything is fine, now it is showing object in Firebug, can you please suggest

image

Also I have try to create Stackblitz but when I import jQuery dependency, it broke my project. you can see it here. https://stackblitz.com/edit/angular-svyvky

GMaxera commented 5 years ago

I don't see how is it possible to use with Angular 6 if the latest release explicitly block installation:

ngx-malihu-scrollbar@1.3.2 requires a peer of @angular/core@^2.4.0 || ^4.0.0 || ^5.0.0

Any advice ?

jfcere commented 5 years ago

Do you have included jQuery in your application and added both jquery and mcustomscrollbar types to tsconfig.app.json like written in the README.md?

.angular-cli.json

"styles": [
  "styles.scss",
+ "../node_modules/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css"
],
"scripts": [
+ "../node_modules/jquery/dist/jquery.min.js",
+ "../node_modules/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js"
],

tsconfig.app.json


{
  "compilerOptions": {
    ...
    "types": [
+     "jquery",
+     "mcustomscrollbar"
    ]
  },
  ...
}
jfcere commented 5 years ago

Library has been updated to Angular 7, please update ngx-malihu-scrollbar to v7.0.0.

GMaxera commented 5 years ago

Thank you. That's fine for me because I'm starting a new project and I can upgrade to Angular 7 my project too and it's fine.... but did you realized that in that way you will never released a version applicable to Angular 6 ? :-)

jfcere commented 5 years ago

@GMaxera This version is applicable to both Angular 6 and 7: https://github.com/jfcere/ngx-malihu-scrollbar/blob/master/lib/package.json#L27