I want to implement particles JS in Angular 7. I followed the stpes of this question. Even the comment of something about Angular 7 When I want to import the particles in my ts file, it says, that it can't find a module with that name. Must I make a new module or is the mistake anywhere else?
Here my Code:
TS:
import { Component, OnInit } from '@angular/core';
import { ParticlesConfig } from '../../assets/data/particles';
declare var particlesJS: any;
@Component({
selector: 'home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit() {
particlesJS('particles-js', ParticlesConfig, function() {
console.log('callback - particles.js config loaded');
});
}
}
HTML:
<div class="box" id="particles-js">
<div class="title">Particles Works!</div>
</div>