I am working on Angular 4.4.6 application and I want to implement some animations on scroll using the awesome plugin AOS
my code:
app.component.ts
import * as AOS from 'aos';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
encapsulation:ViewEncapsulation.None
})
export class AppComponent implements OnInit {
ngOnInit(){
AOS.init();
}
}
app.component.html
<div class="box" data-aos="slide-left">
<img src="assets/imgs/seo.png" alt="">
</div>
angulr.cli.json
"styles": [
"../node_modules/aos/dist/aos.css",
"../node_modules/animate.css/animate.min.css",
"styles.scss"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/aos/dist/aos.js"
],
I've tried the answer here with no hope https://stackoverflow.com/a/44808496/4183947
Note: I've no errors in my console.