typescript - How to add class on scroll in ionic2 -
i want add animation in ionic2 app on scrolling, can't add classes on scroll animation didn't happen on scrolling, animations fired @ 1 time. please me solve problem.
basically there ionscroll
event emitter available on ion-content
can subscribe , whatever need. can find more in docs.
here example:
template.html
<ion-content #content></ion-content>
component.js
import { component, viewchild } '@angular/core' @component({...}) export class component { @viewchild('content') content = null ngafterviewinit() { this.content.ionscroll.subscribe(event => { // need here console.log(event) }) } }
Comments
Post a Comment