-
-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
Consider {{ title }} is a string equal to test.
<!-- include.html -->
<p>The title in the include is: {{ title }}</p><!-- test.html -->
<p>The title is: {{ title }}</p>
<include src="include.html" locals="{{ title }}"></include>Result: SyntaxError: Unexpected token { in JSON at position 1
These won't work, either:
<include src="include.html" locals=locals='{"title": {{ title }} }'></include>
<include src="include.html" locals='{{ {"title": title } }}'></include>
<include src="include.html" locals='{"title": title }'></include>Would be awesome if you could pass expressions variables inside the locals="" attribute - sometimes you need to pass in something that has a dynamic/computed value, so you can't write it out by hand.
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels