Недавно я модернизировал свой угловой проект с версии 15 по 19, и теперь мат-категория больше не работает. Кнопка по -прежнему воспроизводит в DOM, но у нее больше нет стилей дизайна материала - это просто простая кнопка HTML. < /P>
scss < /p>
@use '@angular/material' as mat;
// This file can be used to create a base theme CSS file for a brand.
// To export the CSS file, run: ./node_modules/node-sass/bin/node-sass src/brand-theme.scss dist/brand-theme.css
@include mat.elevation-classes();
@include mat.app-background();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$candy-app-primary: mat.m2-define-palette(mat.$m2-red-palette);
$candy-app-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
// The warn palette is optional (defaults to red).
$candy-app-warn: mat.m2-define-palette(mat.$m2-indigo-palette);
// Create the theme object (a Sass map containing all of the palettes).
$candy-app-theme: mat.m2-define-light-theme((
color: (
primary: $candy-app-primary,
accent: $candy-app-accent,
warn: $candy-app-warn,
),
typography: mat.m2-define-typography-config(),
density: 0,
));
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($candy-app-theme);
< /code>
html < /p>
create
{{ getMessage('task.button') }}
Подробнее здесь: https://stackoverflow.com/questions/796 ... nger-works
После модернизации угловой с 15 до 19 ⇐ Html
Программисты Html
1748362822
Anonymous
Недавно я модернизировал свой угловой проект с версии 15 по 19, и теперь мат-категория больше не работает. Кнопка по -прежнему воспроизводит в DOM, но у нее больше нет стилей дизайна материала - это просто простая кнопка HTML. < /P>
scss < /p>
@use '@angular/material' as mat;
// This file can be used to create a base theme CSS file for a brand.
// To export the CSS file, run: ./node_modules/node-sass/bin/node-sass src/brand-theme.scss dist/brand-theme.css
@include mat.elevation-classes();
@include mat.app-background();
// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$candy-app-primary: mat.m2-define-palette(mat.$m2-red-palette);
$candy-app-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
// The warn palette is optional (defaults to red).
$candy-app-warn: mat.m2-define-palette(mat.$m2-indigo-palette);
// Create the theme object (a Sass map containing all of the palettes).
$candy-app-theme: mat.m2-define-light-theme((
color: (
primary: $candy-app-primary,
accent: $candy-app-accent,
warn: $candy-app-warn,
),
typography: mat.m2-define-typography-config(),
density: 0,
));
// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($candy-app-theme);
< /code>
html < /p>
[i]create[/i]
{{ getMessage('task.button') }}
Подробнее здесь: [url]https://stackoverflow.com/questions/79629134/after-upgrading-angular-from-15-to-19-mat-raised-button-no-longer-works[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия