Programmatically rendering ember components

Sorry to revive this, but I’ve been looking around for a while with no luck.

How do we then use this to actually render a component programatically like the topic title suggests? With JS only?

I know how to add a component using the helper {{component componentName}}, but I don’t have the luxury of doing this in a template with what I’m working on. I’m creating an easy to use modal library where I can show a variety of modals from anywhere in the app.

I have a bunch of modals as components. But obviously I don’t want to go to each template and add all modal components in a hidden state, then just show each one as needed.

2 Likes