Reputation: 975
How can one use dynamic attributes and bindings while rendering raw html. Suppose:
<script>
let name = 'Joseph'
let test = '<p>{name}</p>'
</script>
{@html test} <!-- Outputs: {name} instead of Joseph -->
I know, one would answer that, a better approach to this would be creating a component. But still I want to ask, if there is a way of using bindings inside raw html rendering?
Upvotes: 0
Views: 116