11.0.2 • Published 2 years ago

@baycke/ngx-aos v11.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ngx-aos-demo

Version compatibility

Install later versions in case your app is not running the very latest angular version.

ngx-aos/ngx-aos-core versioncompatible angular versionDocumentation
v7.xv12, v11, v10, v9, v8README
v6.xv8, v7README
v5.xv6README
v4.xv5, v4README

Service

Setup

First you need to install the core npm module:

npm install ngx-aos-core --save

Then add the NgxNgxAosModule to the imports array of your application module:

import { NgxNgxAosModule } from 'ngx-aos-core';

@NgModule({
    imports: [
        /* Other imports here */
        NgxNgxAosModule
        ]
})
export class AppModule {
}

Usage

Using the NgxAosService#init method you may trigger init animations. Provide an options object that provides a reference to the document and the init target. Additional properties are optional.

import { Inject } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { NgxAosService } from 'ngx-aos-core';

export class MyComponent {
 constructor(private aos: NgxAosService) {
 }
   
 ngOnInit(): void {
  this.aos.init({
  });
 }
}