angular-feather icon indicating copy to clipboard operation
angular-feather copied to clipboard

Support for Standalone components

Open AbdealiLoKo opened this issue 2 years ago • 2 comments

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 ?

AbdealiLoKo avatar May 11 '23 06:05 AbdealiLoKo

Any solution or work around for this?

TejasCMehta avatar May 30 '23 06:05 TejasCMehta

add importProvidersFrom(FeatherModule.pick(allIcons)) in app.config.jts file

image

and in your standalone component import FeatherModule

image

Thats it!

jatingarala avatar Dec 01 '23 10:12 jatingarala