particles.js

Particle js background for angular project?

ε祈祈猫儿з 提交于 2019-12-04 13:16:25
问题 Can anyone explain how to add particle js background for angular 6 project? I followed some tutorials as bellow link.but it didn't work for me. https://github.com/VincentGarreau/particles.js/ Thank you. 回答1: this is how i got it to work in my NG6 project: Install particles.js from npm: npm i particles.js --save Add node_modules/particle.js/particle.js in your scripts section in angular.json In your component add: declare var particlesJS: any; before @component Go to particle.js and modify the

Particle js background for angular project?

假装没事ソ 提交于 2019-12-03 09:32:16
Can anyone explain how to add particle js background for angular 6 project? I followed some tutorials as bellow link.but it didn't work for me. https://github.com/VincentGarreau/particles.js/ Thank you. this is how i got it to work in my NG6 project: Install particles.js from npm: npm i particles.js --save Add node_modules/particle.js/particle.js in your scripts section in angular.json In your component add: declare var particlesJS: any; before @component Go to particle.js and modify the particles to your liking then download the particlesjs-config.json file Store that file in your assets/data

How to import and use particles.js in an Angular/Angular2/Angular4 app

﹥>﹥吖頭↗ 提交于 2019-11-26 21:38:21
问题 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? 回答1: