Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: angular import error #4911

Closed
1 task done
MrKioZ opened this issue Feb 18, 2023 · 1 comment
Closed
1 task done

[Bug]: angular import error #4911

MrKioZ opened this issue Feb 18, 2023 · 1 comment
Assignees
Labels
bug Something isn't working triage

Comments

@MrKioZ
Copy link

MrKioZ commented Feb 18, 2023

Contact Details

No response

What happened?

i have installed the package with the following command

npm i tsparticles

i am running on angular version 13.3

When i declare and import the NgParticlesModule
as shown

import { APP_BASE_HREF } from '@angular/common';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomeComponent } from './pages/home/home.component';
import { FormComponent } from './pages/form/form.component';
import { ParticlesComponent } from './components/particles/particles.component';
import { NgParticlesModule } from "ng-particles";

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    FormComponent,
    ParticlesComponent
  ],
  imports: [
    BrowserModule,
    NgParticlesModule,
    AppRoutingModule
  ],
  providers: [{provide: APP_BASE_HREF, useValue: '/'},],
  bootstrap: [AppComponent]
})
export class AppModule { }

and under the home component html file i have declared the html tag for the particle library

<ng-particles [options]="options" id="tsparticles"></ng-particles>

i cant build the application and shows me the following error

Error: node_modules/ng-particles/lib/ng-particles.component.d.ts:29:18 - error TS2314: Generic type 'ɵɵComponentDeclaration' requires 7 type argument(s).

29     static ɵcmp: i0.ɵɵComponentDeclaration<ParticlesComponent, "Particles", never, { "options": "options"; "url": "url"; "id": "id"; "particlesInit": "particlesInit"; }, { "particlesLoaded": "particlesLoaded"; }, never, never, false, never>;

tsParticles Version

2.9.3

Which library are you using?

Angular (ng-particles)

tsParticles Configuration

this.options = {
      fpsLimit: 60,
      particles: {
        color: {
          value: "#000"
        },
        links: {
          enable: true,
          color: "#000"
        },
        move: {
          enable: true
        }
      }
    };

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@MrKioZ MrKioZ added bug Something isn't working triage labels Feb 18, 2023
@matteobruni
Copy link
Collaborator

The latest version uses angular 15, which can’t be used with earlier versions. I’m moving away the components to improve the angular versions support, the angular repository is https://github.com/tsparticles/angular
You can open an issue there so it will be tracked correctly.

@matteobruni matteobruni closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

2 participants