I am working on a project with handlebars, patternlab-node and gulp. Right now my .hbs
files are not working if I try to pass arguments to an atom partial. I've listed an example below.
The molecule:
<div class="filter-group {{ filterGroupClass }}">
{{#each filterGroupContent}}
{{> atoms-filter filterClass="{{filterClass}}" filterText="{{filterText}}" filterValue="{{filterValue}}" }}
{{/each}}
</div>
The data:
{
"filterGroupClass": "test-class",
"filterGroupContent": [
{
"filterClass": "",
"filterText": "Text",
"filterValue": "9"
},
{
"filterClass": "closed",
"filterText": "Text2",
"filterValue": "9"
}
]
}
The atom:
<span class="unit">
<a class="filter {{filterClass}}" href="">{{filterText}}
<span class="value">{{filterValue}}</span>
</a>
<a class="pill-filter-close" href="">Close</a>
</span>
The output right now is showing with the text as: {{filterText}} {{filterValue}}
instead of the text from the json data. But it is displaying the correct number of times from the loop so I believe it is getting information from the json file.
I'm not sure if this is a syntax error or different problem but any help is appreciated.