我们正在将 Angular 应用从 11 版升级到 12 版。现在我们遇到了主题的 scss 问题...
@use '~@angular/material' as mat;
@function mat.get-color-from-palette($palette,$hue:default,$opacity:null) {
@if type-of($hue) == number and $hue >= 0 and $hue <= 1 {
@return mat.get-color-from-palette($palette, default, $hue);
}
虽然这对于 11 版本 12 运行良好,但会引发错误.... :
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: expected "(".
╷
3 │ @function mat.get-color-from-palette($palette,$hue:default,$opacity:null) {
│ ^
╵
有什么想法吗? 最好的,彼得
答案 0 :(得分:1)
我们找到了。已修复:
@function mat-get-color-from-palette($palette,$hue:default,$opacity:null) {
mat-get 与 mat.get