Окончательный редактирование: https://github.com/fortawesome/angular- ... -0.15.0.md
Не ошибка, она была осуждена. Версия FA на рабочей машине составляет 0,14, а версия, которая не работает, составляет 0,15. Я смог создать образец приложения, показывающего ошибку (https://stackblitz.com/edit/angular-ivy ... onent.html) и представил его в FA (https://github.com/fortawesome/angular- ... issues/447). Оставляя это здесь на случай, если кто -то еще сталкивается с той же проблемой и разрывает их волосы, как и я. < /P>
Я не уверен, что происходит. Я работаю над своим кодом с двух машин. Собственность [Spin] какое -то время работала нормально. Недавно я обновил с Angular 17–18, сохранил свои изменения в GIT и синхронизировал на другой машине. На первой машине это все еще работает. На второй машине я получаю ошибку. Вот ошибка: < /p>
Can't bind to 'spin' since it isn't a known property of 'fa-icon'.
1. If 'fa-icon' is an Angular component and it has 'spin' input, then verify that it is included in the '@Component.imports' of this component.
2. If 'fa-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@Component.schemas' of this component.ngtsc(-998002)
< /code>
Это HTML, который вызывает ошибку: < /p>
< /code>
и вот код компонента:
import {component, output, eventemitter, input} от '@angular /core';
import {fainputtext, fapenfield, famicrochipai, faarrowsrotate, faspinner} from '@fortawesse /pro-pro-pro-pro-incorles-same-same-samodula'; Ngclass, ngif, ngswitch} от '@angular/common';
import {fontawesomemodule} от '@fortawesome/angular-fontawesome';
@Component({
selector: 'app-aicard',
standalone: true,
imports: [FontAwesomeModule, CommonModule, NgClass, NgIf, NgSwitch],
templateUrl: './aicard.component.html',
styleUrl: './aicard.component.scss'
})
export class AicardComponent {
@Output() refreshEvent = new EventEmitter();
@Input() title!: string;
faPenField = faPenField;
faInputText = faInputText;
faMicrochipAi = faMicrochipAi;
faArrowsRotate = faArrowsRotate;
faSpinner = faSpinner;
mode = 'user';
previousMode = '';
onRefresh() {
this.refreshEvent.emit();
}
setMode(mode: string) {
this.mode = mode;
}
setLoading() {
if (this.previousMode === '') {
this.previousMode = this.mode;
this.mode = 'loading';
} else {
[this.mode, this.previousMode] = [this.previousMode, ''];
}
}
}
< /code>
и package.json < /p>
{
"name": "app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"serve:ssr:app": "node dist/app/server/server.mjs"
},
"private": true,
"dependencies": {
"@angular/animations": "^18.0.1",
"@angular/cdk": "^18.0.1",
"@angular/common": "^18.0.1",
"@angular/compiler": "^18.0.1",
"@angular/core": "^18.0.1",
"@angular/fire": "^18.0.1",
"@angular/forms": "^18.0.1",
"@angular/material": "^18.0.1",
"@angular/platform-browser": "^18.0.1",
"@angular/platform-browser-dynamic": "^18.0.1",
"@angular/platform-server": "^18.0.1",
"@angular/router": "^18.0.1",
"@angular/ssr": "^18.0.2",
"@fortawesome/angular-fontawesome": "^0.15.0",
"@fortawesome/fontawesome-pro": "^6.5.2",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-brands-svg-icons": "^6.4.2",
"@fortawesome/free-regular-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/pro-duotone-svg-icons": "^6.4.2",
"@fortawesome/pro-light-svg-icons": "^6.4.2",
"@fortawesome/pro-regular-svg-icons": "^6.4.2",
"@fortawesome/pro-solid-svg-icons": "^6.4.2",
"@fortawesome/pro-thin-svg-icons": "^6.4.2",
"@fortawesome/sharp-solid-svg-icons": "^6.4.2",
"canvas": "^2.11.2",
"express": "^4.18.2",
"motion": "^10.17.0",
"ngx-color-picker": "^16.0.0",
"openai": "^4.31.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.0.2",
"@angular/cli": "^18.0.2",
"@angular/compiler-cli": "^18.0.1",
"@types/express": "^4.17.17",
"@types/jasmine": "~5.1.0",
"@types/node": "^18.18.0",
"jasmine-core": "~5.1.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.4.5"
}
}
< /code>
Есть идеи о том, почему это происходит или что я могу попробовать? Я удалил весь каталог node_modules и Reran «npm i», чтобы убедиться, что все пакеты обновлены.
Подробнее здесь: https://stackoverflow.com/questions/785 ... snt-a-know
Используя Fontawesome 6 с Angular 18, «не может привязаться к« спине », поскольку он не является известным свойством« Fa ⇐ Html
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение