包装:@tsparticles/angular
tsParticles 的官方 Angular 包装器 (<ngx-particles />)。
安装
bash
pnpm add @tsparticles/angular @tsparticles/engine @tsparticles/slim快速设置流程
- 在应用启动时注册一次
NgParticlesService。 - 使用
loadSlim(engine)加载功能。 - 在模板中渲染
<ngx-particles [id] [options] />。
Monorepo 参考资料
- 包文件夹:https://github.com/tsparticles/tsparticles/tree/main/wrappers/angular
- 演示应用程序:https://github.com/tsparticles/tsparticles/tree/main/demo/angular
