Pass a model to a controller

Hi!

in my helper i try to call this.get(‘model’) and appears the error “this is undefined”.

So, is there any way to get it directly from the helper? Or should i pass it from the template?

Hi @emiliogambone.

Yes, you should explicitly pass the model to the helper.
this.get('model') works in the controller because the route sets it up beforehand, everything else you have to explicitly pass it.

1 Like