Can't I use variable inside of jquery document.getReady function?


test:any="test!!!"
constructor( ... ... ) {
}
ionViewDidLoad() {
    console.log('ionViewDidLoad MainPage');
    $(() => {
     

       console.log(this.test);

    })
}

I console loged on jquery , but it always says undefined.
(()=>{} is same as (document).ready , I think.

how can I use variable declared on .ts to document.ready inside?

Yap, you can use JQuery in Ionic-4 by declaring $
Example:

declare var $

then you can use JQuery like $ sign.
Thanks

i’m not asking how to use jquery…i’m using it quite well
but wonder how can I use variable used in document.getReady function on jquery

Not clear.
Write code and details.