Hi everyone,
I just try to get custom with Ionic V2 and got a question regarding calling functions within a class.
I got a directive, that checks wether and element is the last one and then fires a method (slideTest) within the page.ts.
This method contains a method call to “setSlideInClass” with a timeout. But i don’t figure out how to address this method. Neither “setSlideInClass()” nor this.setSlideInClass()" do work.
Please find below a somewhat simplified copy of the class in question, where I stripped of the content that is not related to the problem.
Any hint on what i am missing would be great.
export class ListePage {
constructor(private navCtrl: NavController, navParams: NavParams, public http: Http) {]
slideTest(){
setTimeout(function () {
setSlideInClass(elements[i]);
}, 1000 * i);
}
setSlideInClass(element){
element.className += " slide-in";
}
}