我有一个绑定eid: '@'
在我的构造函数中,我有一个方法:
this.$onInit = () => {
console.log('eid: ', this.eid)
}
console.log("eid in another place: ", this.eid)
当我执行此代码(通过输入我的应用程序的某个页面)时,我在控制台中看到
eid in another place: undefined
eid: 1
如何传递eid
变量以在onInit
函数外部查看它?