I have a template that might render one of many different components. In the controller, I define which component is currently active, and then want to render it with something like:
{{render-component activeComponent}}
Unfortunately, the render-component
part of things doesn't work. I followed the example I found here, but it's throwing the error: undefined is not a function
.
In the example I linked to, they're passing in a second parameter like {{renderComponent widget.componentClass widget=widget}}
, and perhaps since I'm not doing the same, that's why I'm getting this error? I tried passing this
:
{{render-component activeComponent this}}
But I get the same error. Any tips? Unfortunately, I can't find any documentation on Handlebars's resolveHelper
, which seems to be at the heart of the issue.