Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4841

How can I inline a Component's layout in an AddOn?

$
0
0

@andrew1 wrote:

I'm creating a library of components that will have very simple layouts. For example:

export default Ember.Component.extend({
  layout: Ember.HTMLBars.compile('{{row.id}}')
});

The problem is, this will fail with the error:

Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.

unless I import the template compiler in ember-cli-build.js of the consuming application:

app.import(app.bowerDirectory + '/ember/ember-template-compiler.js');

Is there anyway I can import the template compiler in the AddOn so that I don't add this dependency in the consuming application?

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4841

Latest Images

Trending Articles



Latest Images