Skip to content Skip to sidebar Skip to footer

Possible Issue In Jsrender With Spaces

i have some problem with rending this jsrender code, it works if title == 'Teamledare Redo' but if i have more words like this: 'teamledare Redovisning', then it not works.. Why do

Solution 1:

OK - buried in the comments above is the following:

The problem is that there is an error in the template. <a href= {{>id}} > should be <a href='{{>id}}'>.

As to {{if title == 'Teamledare Redovisning'}} that will work fine. Not an issue with JsRender at all.

BTW I would usually write the above as {{if title==='Teamledare Redovisning'}}. The extra white space you have makes it harder to parse - though it will work fine. Similarly I would write {{else title==='VD'}}.

Post a Comment for "Possible Issue In Jsrender With Spaces"