angular-feather
angular-feather copied to clipboard
Support for Standalone components
I was trying to write a standalone component in angular 15 And I tried:
@Component({
selector: 'my-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss'],
standalone: true,
imports: [SharedModule, FeatherModule.pick(ChevronRight)],
})
Which gives the error:
imports' contains a ModuleWithProviders value, likely the result of a 'Module.forRoot()'-style call. These calls are not used to configure components and are not valid in standalone component imports - consider importing them in the application bootstrap instead
So, I was wondering how can I use this package with standalone components ?
Any solution or work around for this?
add importProvidersFrom(FeatherModule.pick(allIcons)) in app.config.jts file
and in your standalone component import FeatherModule
Thats it!