📜  安装 aos angular 10 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:41.703000             🧑  作者: Mango

代码示例1
//install
npm install aos --save
//inside the angular.json inside of 'build', look for the 'styles' and 'scripts'
//inside them add:
styles: [... "node_modules/aos/dist/aos.css"]
scripts: [... "node_modules/aos/dist/aos.js"]

//to add AOS for the entire project, at the top of app.component.ts add:

import * as AOS from 'aos';

ngOnInit(){
AOS.init();
}