-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When using the prebuilt "azure-blue" M3-based theme (@angular/material/prebuilt-themes/azure-blue.css) I get a warning in the browser console:
Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming main.ts:5
Despite of the warning, the Material components seem to work as they should, I haven't tested them all though.
Reproduction
StackBlitz link: https://stackblitz.com/edit/stackblitz-starters-wu4fpp?file=src%2Fapp%2Fapp.component.html
Steps to reproduce:
- Create a new Angular 18 app (without SSR)
- Add Angular Material 18 and select the azure-blue M3-based prebuilt theme.
- Add a Material component, for example a button, to app.component.
- Serve and watch the browser console for the warning (open preview in new tab in Stackblitz and open console in DevTools).
Expected Behavior
No warning in the console.
Actual Behavior
The above mentioned warning in the browser console.
Environment
Angular CLI: 18.0.1
Node: 20.12.1
Package Manager: npm 10.5.0
OS: win32 x64
Angular: 18.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.1800.1
@angular-devkit/build-angular 18.0.1
@angular-devkit/core 18.0.1
@angular-devkit/schematics 18.0.1
@angular/cli 18.0.1
@schematics/angular 18.0.1
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.6