Pass a model to a controller


#1

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?


#2

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.