FortAwesome/angular-fontawesome

Standalone Component inject Error

SOG-web opened this issue · 1 comments

Angular 16-rc Standalone component

The icon display but I keep getting this error

ERROR RuntimeError: NG0203: inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. Find more at https://angular.io/errors/NG0203
    at injectInjectorOnly (file:///home/sogtheimmortal/Documents/Github/houseofrou/node_modules/@angular/core/fesm2022/core.mjs:620:15)
    at ɵɵinject (file:///home/sogtheimmortal/Documents/Github/houseofrou/node_modules/@angular/core/fesm2022/core.mjs:631:61)
    at ɵɵdirectiveInject (file:///home/sogtheimmortal/Documents/Github/houseofrou/node_modules/@angular/core/fesm2022/core.mjs:10660:16)
    at NodeInjectorFactory.FaIconComponent_Factory [as factory] (ng:///FaIconComponent/ɵfac.js:5:43)
    at getNodeInjectable (/node_modules/@angular/core/fesm2022/core.mjs:4600:44)
    at instantiateAllDirectives (/node_modules/@angular/core/fesm2022/core.mjs:11685:27)
    at createDirectivesInstances (/node_modules/@angular/core/fesm2022/core.mjs:11105:5)
    at ɵɵelementStart (/node_modules/@angular/core/fesm2022/core.mjs:15106:9)
    at Module.ɵɵelement (/node_modules/@angular/core/fesm2022/core.mjs:15164:5)
    at CollableContentComponent_fa_icon_5_Template (/src/app/shared/components/collable-content/collable-content.component.ts:24:27) {
  code: -203
}

We don't officially support Angular 16 yet, so that may be the reason. I'll look into adding support in the coming weeks or could check if that may be a user error if you provide a minimal reproduction of the problem.