Coder Social home page Coder Social logo

Comments (8)

sclausen avatar sclausen commented on August 16, 2024 1

@sconix works like a charm ;)

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024 1

Just like any other module there is nothing special in this module. So if you import in a module and use it in other then you need to export it as well. Other than that it does not matter if you use it lazy loaded module or none lazy loaded there is no difference in the usage.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

I haven't used lazy loading yet, so can't help you right away. Can you make a Plunker example etc. about your problem? Then I could have a look and see what is going on.

When importing in AppModule do you also export it?

from ngx-perfect-scrollbar.

sclausen avatar sclausen commented on August 16, 2024

At first, here is a working plunker of your example: http://plnkr.co/edit/E286oz?p=preview

from ngx-perfect-scrollbar.

sclausen avatar sclausen commented on August 16, 2024

Here is a plunkr, demonstrating the problem: http://plnkr.co/edit/20Sraq?p=preview
EDIT: Here is a better demonstration, where a not lazy loaded component has a working perfect-scrollbar and the lazy loaded component won't load: http://plnkr.co/edit/Cv5ibD?p=preview

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

Thanks for the examples, now I remember why the module loading is only allowed in app module :) It was only supposed to be temporal and I was going to add the forChild method as well for loading the module in lazy modules. I will release 0.9.0 soon where this has been fixed.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

This is now fixed in 0.9.0, let me know if you still have problems.

from ngx-perfect-scrollbar.

breadadams avatar breadadams commented on August 16, 2024

How does this work? I've tried importing in main AppModule and i'm getting a 'perfect-scrollbar' is not a known element error.

Importing in my SharedModule fixes it, but maybe I'm just doing something wrong? 🤔

from ngx-perfect-scrollbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.