-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Description
Feature Description
Change type that MATERIAL_SANITY_CHECKS provides from boolean to:
interface SanityChecks {
doctype: boolean;
theme: boolean;
version: boolean;
hammer: boolean;
}or even type boolean | SanityChecks for backwards compat
Use Case
We dynamically add the theme scss based on the user, this causes the warning
components/src/material/core/common-behaviors/common-module.ts
Lines 105 to 109 in 7f74211
| console.warn( | |
| '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' | |
| ); |
because the theme is not loaded yet when this code runs. Currently, to disable the warning we:
{
provide: MATERIAL_SANITY_CHECKS,
useValue: false
}although the other checks could still be useful, if you could do
{
provide: MATERIAL_SANITY_CHECKS,
useValue: {
doctype: true,
theme: false,
version: true,
hammer: true
}
}Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix