I have an Angular app that I want to use particles.js in however I have no clue how to add it and get it working.
I've added it to the .angular-cli.json
"scripts": [
"../node_modules/particles.js/particles.js"
],
And I've imported it into my component
import * as particlesJS from 'particles.js';
And attempted to initialize it using
particlesJS.load('particles-js', 'assets/particles.json', function() {
console.log('callback - particles.js config loaded');
});
Has anyone got this working?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…