I'm using jade in a nodejs
project
Can't find how to define filters
I have categories that i want to display in a select box, lowercase option values and uppercase option text
select
each cat in categories
option(value="lowercase(#{cat})") uppercase(#{cat})
any idea ?
Why are you not using the native JavaScript functions to do so?
select
each cat in categories
option(value=cat.toLowerCase())= cat.toUpperCase()
You can also use:
select
each cat in categories
option(value=#{cat.toLowerCase()}) #{cat.toUpperCase()}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With