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

MalihuScrollbarService / MalihuScrollbarDirective not exported in the bundle #18

Closed philippejer closed 6 years ago

philippejer commented 6 years ago

Hello,

Looking at the npm bundle in the current version 1.2.1 (node_modules\ngx-malihu-scrollbar\dist\bundles\ngx-malihu-scrollbar.umd.js) it seems only MalihuScrollbarModule is exported, not the directive or service, so the service cannot be injected (MalihuScrollbarService is undefined and cannot be used as a token).

Reproduced here: https://plnkr.co/edit/YQaW13j5sW5n7xKjjX7F

(BTW thanks for the performance in 1.2.1, it seems to work fine, the dirty checking is not invoked on each auto-update anymore).

Regards, Jeremy

jfcere commented 6 years ago

Hi @philippejer,

Thanks for the plunker, you have to import MalihuScrollbarModule in the AppModule for the service to be registered but even when It's done, you are right there is still a problem as MalihuScrollbarService does not seems to be exported in the bundle files.

I updated the plunker with the import statement for MalihuScrollbarModule: https://plnkr.co/edit/udrbMTov42xcQ69fSIVl

I'm going to take a look at it this weekend ... I'll keep you in touch.

jfcere commented 6 years ago

Bundle exports are now fixed, please update to v1.2.2.

I updated the plunker to the latest version: https://plnkr.co/edit/MU8D0sMfEXiLifAnCm5X

philippejer commented 6 years ago

Hi @jfcere,

Just upgraded to 1.2.2 and it works perfectly, thanks for the quick resolution!

Regards, Jeremy