npm install aos code example
Example 1: animate on scroll github
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init();
</script>
Example 2: aos js cdn
CSS
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
JS
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
INITIALIZE AOS:
<script>
AOS.init();
</script>
Example 3: install aos angular 10
//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();
}
Example 4: aos animate install
//install
npm install aos --save
//initialize in react
import AOS from 'aos'
import 'aos/dist/aos.css';
AOS.init();