-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I'm using Angular standalone components with @tsparticles/angular and @tsparticles/engine. However, I’m encountering the following issues:
- NgxParticlesComponent is not standalone
When trying to use in a standalone component, Angular throws an error
The component 'NgxParticlesComponent' appears in 'imports', but is not standalone and cannot be imported directly. It must be imported via an NgModule.
Since standalone components do not use NgModule, this makes integration difficult.
- Type Error in particlesOptions
When assigning MoveDirection.bottom, ClickMode.push, or HoverMode.repulse to particlesOptions, TypeScript throws:
Type 'string' is not assignable to type 'number | "none" | MoveDirection | "bottom" | "bottomLeft" | "bottomRight" | "left" | "right" | "top" | "topLeft" | "topRight" | "outside" | "inside" | MoveDirectionAlt | undefined'.
this is another error i am receiving on importing Click Mode and Hover Mode
Environment
Angular Version: 19
tsParticles Version: (latest)
Node.js Version: v20.17.0
Provide a standalone-compatible version of NgxParticlesComponent.
Improve TypeScript definitions to correctly infer enums in particlesOptions.