Answer the question
In order to leave comments, you need to log in
How do I set an optional argument in a Pug mixin?
There is a mixin:
mixin select(length=5)
select
- for (var i = 1; i <= length; i++)
option(value=i)= i
+select(class="my-class")
Answer the question
In order to leave comments, you need to log in
mixin select(value, length=5, elClass)
- elClass = elClass || ''
select(class = elClass)
- for (var i = 1; i <= length; i++)
option(value=i)= i
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question