X [BER]期望$connect.Color.primary是有效的M3调色板.
角 17
我在任何地方都找不到@angular/material-experimental预期有效的M3调色板.
在styles.scss中try 了这一点:
@use "@angular/material" as mat;
@use "@angular/material-experimental" as matx;
$primary-palette: (
0: #000000,
10: #191027,
20: #2b1a41,
25: #3d245c,
30: #4f2f76,
35: #9257c5,
40: #654083,
50: #79539b,
60: #9d80b7,
70: #c1aed3,
80: #e5dbef,
90: #e5ddee,
95: #e9e3ef,
98: #ebe7ef,
99: #efecf1,
100: #ffffff,
);
$m3-custom-theme: (
color: (
primary: $primary-palette
),
);
$light-theme: matx.define-theme($m3-custom);
html,
body {
height: 100%;
@include mat.button-theme($light-theme);
}