Closed timarney closed 4 years ago
Added a filter to open up the possibility of using arbitrary params.
We could filter out to use only data- params for safety.
See this link for output https://cds-node-starter-pr-69.herokuapp.com/start
Will remove the sampleInput later
{{ sampleInput({"class": "error", "data-arr1":"data-1","data-arr2":"data-2"}) }}
{% macro sampleInput(obj) %} <div {{""|spreadParams(obj) }}> your text </div> {% endmacro %}
Outputs
<div class="error" data-arr1="data-1" data-arr2="data-2"> your text </div>
Added a filter to open up the possibility of using arbitrary params.
We could filter out to use only data- params for safety.
See this link for output https://cds-node-starter-pr-69.herokuapp.com/start
Will remove the sampleInput later
Outputs