Scala Play template - Insert variable of scope angular into string
Scala Play template - Insert variable of scope angular into string
I'm using Play framework and using AngularJS in view and I want to add a external widget to a template home.scala.html
and pass variable dataHash
(from $/scope) to artribute data-hash
like this:
home.scala.html
dataHash
data-hash
<script type='text/javascript'
id='sp_widget'
data-hash='dataHash'
src='www.widgeturl.com/widget'>
</script>
I have already check variable and sure that it containe value in this template (print it with <h1>dataHash</h1>
).
<h1>dataHash</h1>
The problem here is it not work. When I inspect page, it still show string dataHash
inside script tag. Is there any solution for this ?
dataHash
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.