I noticed that console.log(this.object)
will return undefined
if I call a function from the Controller, but if I used a button in the UI to invoke it, it will return the object.
When this
is inspected, the this.object
invoke property getter
which probably is what happens when I use the button to call my function.
Why is this happening and how can I access the this.object
from within the Controller?
Note that this might not be the best solution, but getting the object
by calling for the collection in this.autorun
solves the issue