How to dynamically create a component

I’m working on a module which needs to register components with Ember, Angular, React etc. depending on what is loaded into the page.

With React I can just do

if (window.React) {
  React.createClass(...

But how can I do the same with Ember? I’m looking for something like:

if (window.Ember) {
  Ember.registerComponent('my-component-name', Ember.Component.extend({
    ...
  }));
}

Is this possible?

app.register('component:x-foo', ComponentType);

There is also the component helper, and I’m unsure which you should use without knowing more about the usecase.

http://emberjs.com/api/classes/Ember.Templates.helpers.html#method_component

Hmm. Is it possible to do this without having access to an app instance? In this case I’m hoping to register a component before any apps are even created.