copenndthagen
copenndthagen

Reputation: 50810

Insert script tag in a Ember template

Is it possible to insert script tag in a Ember template (i.e. hbs file) I want the following script tag to be rendered inside my page. if not in hbs template, how can I do that in my Ember app ?

<script language="javascript">

var x= '-----BEGINCERT-----

-----END CERT-----\n;';
</script>

Upvotes: 0

Views: 1891

Answers (1)

Adam Cooper
Adam Cooper

Reputation: 8687

Script tags are explicitly not allowed in Ember templates. There's an issue that discusses this on GitHub. If you're trying to set a global variable you could do as suggested in the comments and set the value from code. Alternatively you could add the script to the index.html of your app.

Upvotes: 1

Related Questions