Angularjs 在Ionic本地通知中访问构造函数内部和外部的变量

Angularjs 在Ionic本地通知中访问构造函数内部和外部的变量,angularjs,typescript,ionic-framework,hybrid-mobile-app,localnotification,Angularjs,Typescript,Ionic Framework,Hybrid Mobile App,Localnotification,我想在“ionViewDidLoad()”中的构造函数之外访问“工作\开始\通知\时间”的值。有可能吗?我正在尝试绘制一张我创建的所有通知时间的图表。或者,是否可以访问我使用其“id”创建的localnotification 提前感谢,, skr export class HomePage { constructor(public navCtrl: NavController, public alertCtrl: AlertController, private plt: Platform

我想在“ionViewDidLoad()”中的构造函数之外访问“工作\开始\通知\时间”的值。有可能吗?我正在尝试绘制一张我创建的所有通知时间的图表。或者,是否可以访问我使用其“id”创建的localnotification

提前感谢,, skr

export class HomePage 
{

 constructor(public navCtrl: NavController, public alertCtrl: AlertController, private plt: Platform, public localNotifications: LocalNotifications,) {
     this.plt.ready().then((rdy) => {

       let date = new Date();
       let before_work_notification_time = new Date(date.setHours(7,0,0) )


       this.localNotifications.schedule({
         id:1,
         title: 'Good morning',
         text: 'My morning notification' + before_work_notification_time.getHours(),
         at: before_work_notification_time,
         every: 'day',
         data: { mydata: 'My daily before work notification'}
       });
}
}
export class HomePage 
{

//outside scope variables
public work_start_notification_time:any ;

 constructor() {
    //assign a value 
this.work_start_notification_time = "somevalue";

}

someMethod()
{
  //access from outside constructor 

console.log(this.work_start_notification_time);
}
}