title: Typescript: Cannot access property from inside a function
body: <pre><code>export class DuyurularPage {
      duyurular: any;
      loading: any;
  
      constructor(public navCtrl: NavController, public navParams: NavParams, public loadingPage: LoadingController,
          platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
  
          this.loading = this.loadingPage.create({
              content: `
              &lt;ion-spinner&gt;&lt;/ion-spinner&gt;`
          });
  
          platform.ready().then(() =&gt; {
              statusBar.styleDefault();
              splashScreen.hide();
  
              var notificationOpenedCallback = function (jsonData) {
                  this.duyurular = jsonData.notification.payload;
              };
  
              alert
              window["plugins"].OneSignal
              .startInit("12312412412412", "1231241212")
              .handleNotificationOpened(notificationOpenedCallback)
              .endInit();
          });
      }
  }
  </code></pre>
  
  <p><code>var notificationOpenedCallback = function...</code> ← Inside this function, I cannot access <code>this.duyurular</code>.  </p>
  
  <p>I have to write this array (<code>duyurular</code>) up from json. How can I do that?</p>