I'm building an Ember app and I use ember-cli. The version of Ember is 2.14. I need to compile client side a string into a Handlebars template, for this reason I know that I have to import the module. Now, in my package.json
I have ember-source
, which have Handlebars inside. Is there a correct way to use it and import it in the right way? I tried with import Source from 'ember-source';
at the beginning of the file and then use it as Source.Handlebars.compile(textToCompile);
but it didn't work.
Also, if the answer is nope, is there a way, in general, to import the Handlebars compiler easily for an ember-cli project?
Thank so much.
Aucun commentaire:
Enregistrer un commentaire