Git Product home page Git Product logo

Comments (7)

mscard02 avatar mscard02 commented on August 22, 2024 1

here is a brand new generated angular app I created with just angular material and your npm package installed so that you can easily see the issue. it will run fine with just ng serve, but run ng serve --prod and you will see the error with aot compilation kicks in. this replicates what we are seeing on our servers.

https://github.com/mscard02/dynamic-color-issue

from angular-material-css-vars.

johannesjo avatar johannesjo commented on August 22, 2024

I am unable to reproduce this neither with angular 8 or 9. How did you include the module to your app?

from angular-material-css-vars.

johannesjo avatar johannesjo commented on August 22, 2024

hmhm still no error with

ng serve --prod --aot

Neither with

ng build --prod --aot

Which OS are you on?

from angular-material-css-vars.

mscard02 avatar mscard02 commented on August 22, 2024

i am on windows 10 using VSCode as my code editor. The same happened to me on both my work laptop and home pc. When I mention an error, it builds correctly, but the error will show in the chrome console. I appreciate the quick responses!

image

from angular-material-css-vars.

mscard02 avatar mscard02 commented on August 22, 2024

I also found that setting the aot and build optimizer to false (build optimizer has to be false with aot turned off) will fix the problem and it will display in the browser with no issues.

image

from angular-material-css-vars.

johannesjo avatar johannesjo commented on August 22, 2024

Not really sure why that is the case. As a temporary workaround you can use:

  providers: [MaterialCssVarsService],

inside app.module.ts

from angular-material-css-vars.

johannesjo avatar johannesjo commented on August 22, 2024

Generally speaking: I doubt that this an issue of angular-material-css and rather some build weirdness going on with angular with specific versions. The service is providedIn: 'root' might be that this doesn't work so well with libraries under some circumstances. I really don't know.

from angular-material-css-vars.

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.