Comments (7)
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.
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.
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.
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!
from angular-material-css-vars.
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.
from angular-material-css-vars.
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.
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)
- Angular 15 support HOT 14
- mat-typography not working anymore
- var(--palette-primary-500-rgb) is not a color. Falling back to "dark" tone. HOT 8
- Is contrast currently broken? HOT 3
- More custom theme ability HOT 3
- V15 MDC Fixes HOT 32
- How to use it with Angular 14 HOT 6
- Opacity Broken in mat-css-color utility HOT 1
- Docs on $mat-css-dark-theme-selector and $mat-css-light-theme-selector not accurate HOT 3
- Legacy Checkbox - checkmark not displayed anymore HOT 1
- Material 15: Usage of default palettes HOT 3
- Foreground and Background mapping HOT 3
- Setting Variables and Styles with default material mixins HOT 4
- v5.0.0-next.0: SassError: Undefined mixin @include app-theme($mat-css-theme); HOT 3
- Allow setting theme on a specific element HOT 3
- Is it possible to disable "isDarkTheme" specific css? HOT 3
- Contrast color edge cases & slightly different dark text color HOT 1
- Checkbox check mark bad contrast in dark mode
- Angular 17 support
- mixin `mat-css-set-palette-defaults` not generating any code HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-material-css-vars.