【发布时间】:2017-10-13 06:54:12
【问题描述】:
我注意到,如果我从 Controller 调用函数,console.log(this.object) 将返回 undefined,但如果我使用 UI 中的按钮调用它,它将返回对象。
当检查this 时,this.object invoke property getter 这可能是我使用按钮调用我的函数时发生的情况。
为什么会发生这种情况?如何从 Controller 中访问 this.object?
【问题讨论】:
标签: angular-meteor