/ng-particles

tsParticles Angular Component

Primary LanguageTypeScript

This Repository has been moved!

This repository is now part of https://github.com/matteobruni/tsparticles, this repository will be archived because it's included in the main package tsParticles


tsParticles - Angular Component Node.js CI

tsParticles Angular component

How to use it

Install

npm install ng-particles

or

yarn add ng-particles

Usage

template.html

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

app.ts

export class AppComponent {
  particlesOptions = {
    particles: {
      color: {
        value: [ '#ff0000', '#0000ff' ]
      },
      lineLinked: {
        enable: true,
        color: 'random'
      },
      move: {
        enable: true,
        speed: 5
      }
    }
  };
}

app.module.ts

import { NgParticlesModule } from 'ng-particles';
import { NgModule } from "@angular/core";

@NgModule({
  declarations: [
    /* AppComponent */
  ],
  imports: [
    /* other imports */ NgParticlesModule // NgParticlesModule is required
  ],
  providers: [],
  bootstrap: [ /* AppComponent */ ]
})
export class AppModule { }

Need More Help?

Slack