Qin_Shihuang Qin_Shihuang - 5 months ago 11
AngularJS Question

Calling other functions in the same class gets "Can't find variable" in ionic 2

Probably this is a stupid question but I just can't find anyone who has a similar question on the Internet. I'm using ionic 2 to build an app, and I have this code:

export class LoginPage {
constructor(...) {...}
jump() {...}
authenticate() {
jump();
}
}


But when I run it, I got Uncaught (in promise): ReferenceError: Can't find variable: jump. The authenticate() works well when I call it from the .html (click). This is my first time using ionic 2 and angular js, please help this rookie out lol. Thanks!

Answer
export class LoginPage {
    constructor(...) {...}
    jump() {...}
    authenticate() {
        this.jump();
    }
}