I have the following parent template
{{render 'form' this}}
and the following partial template
<form>
...
</form>
<a href='#' {{action 'cancel'}}>{{buttonTitle}}</a>
the buttonTitle is coming through from the parent controller but the cancel action that is defined in the same controller is not binding. What am I doing wrong?
I think what you want is the
templatehelper, which renders templates in the current context.The
renderhelpers renders a template with its associated controller. So for example, if you did:That would render the
sidebartemplate usingApp.SidebarController.If you did:
That would render the
posttemplate usingApp.PostController, with the currentpostas the controller’s model.It was a bug that these sub-controllers don’t bubble up events, but I don’t think that you wanted this behavior in the first place. (UPDATE This bug is now fixed on master)
We are planning on making the naming and usages much clearer in the coming weeks.