[SOLVED] [V3] [Router Component] - Get this.$app in a method

Hello! First of all thank you for your attention.

I am working with version 3.6.7 and routable components. I have been trying for hours to make the following basic example work (see page “Test”) and I can not find the way:


Why does console.log(this) in an “on” event not return the same as console.log(this) in a method?

I need to solve by keeping the Ajax call and the $setState in a separate method (I know this in the onPageInit works).

Thanks again. Regards,

Where did you get that syntax self.$options.methods.getData();? You should never do it. To call component methods, it should be just self.getData()


Perfect, as always Vladimir.

Thank you very very much.

Greetings, Fabricio.