We can compile jade template as an anonymous function and call it when we need to render it on client side. What about mixins?
mixin:
mixin tiny(text)
button.tiny #{text}
We can compile jade template as an anonymous function and call it when we need to render it on client side. What about mixins?
mixin:
mixin tiny(text)
button.tiny #{text}
You can use them like this:
Declare your mixin somewhere, then use
+
to call it when you want and pass the parameters in.In your example