Quantcast
Viewing all articles
Browse latest Browse all 4826

How to dynamically create a component

@bluepnume wrote:

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?

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles