Coder Social home page Coder Social logo

Comments (12)

sconix avatar sconix commented on August 16, 2024

AOT support is definitely coming, but currently I am bit busy. So I can't say any time when I can fix this, but at least withing this month. Naturally if somebody can make a PR then I will gladly accept that and make a new release.

from ngx-perfect-scrollbar.

Merraclius avatar Merraclius commented on August 16, 2024

Cool, thanks for reply.

from ngx-perfect-scrollbar.

korlu avatar korlu commented on August 16, 2024

Nice library.. but I, too, need AOT support. Thanks.

from ngx-perfect-scrollbar.

drakenfly avatar drakenfly commented on August 16, 2024

I just wanted to ask if there's something going on about the issue. I'm building my project on top of angular-cli and can't upgrade to the last version :/

Note: angular2-perfect-scrollbar is still working with angular-cli beta.20-4, and angular ^2.1.0. Hope this will be fixed soon to upgrade the cli and angular itself.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

I am waiting angular-cli team to get working release out, I have not been able to use the latest after beta.20 since the releases after that seem to have so many problems. When new working release comes out and this needs some changes I will naturally make them, but for now I think the problem is in angular-cli.

I am going to look into AOT support in this month.

from ngx-perfect-scrollbar.

drakenfly avatar drakenfly commented on August 16, 2024

Just one thing to mention: Solving the problem is as easy as following:

{
  provide: PerfectScrollbarConfig,
  useFactory: (config) => new PerfectScrollbarConfig(config),
  deps: [
    PERFECT_SCROLLBAR_CONFIG
  ]
}

change useFactory: (config) => new PerfectScrollbarConfig(config) to useFactory: anyMethodNameYouLike

and add a function to the end of the file

export function anyMethodNameYouLike(config): any {
  return new PerfectScrollbarConfig(config);
}

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

You mean that fixes AOT? Thanks for the info, I will change that for the release of today.

from ngx-perfect-scrollbar.

drakenfly avatar drakenfly commented on August 16, 2024

At least I removed the dependency to ng2-ps, added PS directly as dependency, copied your source files to my-project-root --> "/angular2-perfect-scrollbar/source-files...." and only changed that line. Angular-CLI started working again.

Without that line changed, I got the same error using the source code directly as using it as a dependency.

Tested with cli-beta.22-1 and beta.24.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

Ok, but in a way it makes sense and I can understand my way causing some problems so I will change it anyway. Thanks for letting me know about that change.

from ngx-perfect-scrollbar.

drakenfly avatar drakenfly commented on August 16, 2024

I reinstalled angular2-perfect-scrollbar and got the same error. Now I tested to modify the JS-source from your library in node_modules as I did to the typescript-files, but the CLI throws the same error. Maybe I was looking forward too early.

If you have time, please validate if that really fixes the problem before publishing (although I think that this change cannot break anything).

At least, with angular-cli.beta-24, the pipeline is not completely broken anymore!

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

Ok, I am trying to get our project building with cli beta.24. When (if) I get it working I will post my findings here and if changes needed will release newer version today.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on August 16, 2024

The upcoming 2.0.0 version supports latest angular-cli since the library is now AOT compatible. Which means that it also brings support for AOT. The umd bundle is still provided and in addition there is not minified version of the umd bundle.

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.