Calling function from constructor


#1

My code looks something like this:

@Page({
templateUrl: ‘build/pages/myPage/myPage.html’
})

export class Login {
constructor() { myFunction(); }
myFunction(){
}
}

When I call myFunction from inside of the constructor it tells me the function is not defined? How can I call the function from the constructor?


#2

it should be:

constructor() {
this.myFunction();
}


#3

Thanks for the reply, it works!