I created a CMS where you can create HTML templates for creating templates. Templates must be compiled on the client side, and there is a component that should display the template. I set the component template property to a function that returns a compiled template using HTMLBars.
import Ember from 'ember';
export default Ember.Component.extend({
content: null,
template: function () {
return Ember.HTMLBars.compile(this.get('content.template'));
}
}
I have included the ember-template compiler in my Brocfile.
app.import('bower_components/ember/ember-template-compiler.js');
also tested
app.import('bower_components/ember-template-compiler/index.js');
But the template is never displayed.
source
share