ng-easing
v1.0.2
Published
Animations easing using Angular
Downloads
17
Maintainers
Readme
ng-easing
Ease Animation for angular [Tested for angular6]
Installation
npm install ng-easing
How to use
imports
app.module.ts
import { NgEasingService } from 'ng-easing';
@NgModule({
providers: [NgEasingService]
})
app.component.ts
import { NgEasingService } from 'ng-easing';
constructor(protected easeSvc: NgEasingService) {
}
this.easeSvc.anmaionStart({'duration': 10000, 'from': 0, 'to': 6800, 'ease': 'easeInQuart', 'delay': 0}, (v) => {
console.log(v);
document.getElementById('sampleDiv').style.transform = 'rotate('+ v +'deg)'
},
function(v) {
console.log('anmateDone at :' + v);
});
anmaionStart(params, onUpdate, onComplete);
params Object {duration, from, to, ease, delay}
duration : milisecond
ease: refer ease Sample below
delay : milisecond (optional)
onUpdate : CallBackFunciton;
onComplete: CallBackFunciton;