How to pass mixin link to another mixin as mixin parameter in jade4j

I want to reach in jade4j -

in the following way:
mixin mixin_a() p This is mixin A mixin mixin_b(mixin_reference) p This is mixin B +mixin_reference() +mixin_b(mixin_a) 

Here I pass mixin_a as a link in mixin_b and expect it as a parameter.

But, when I try to do +mixin_reference() , it says - mixin_reference is not defined .

Question: 1. What am I doing wrong when calling mixin_reference? 2. What should be best to achieve the same functionality? (the reason is that I expect the name of the parameter in the mixin mixin_b will read dynamic.

+4
source share
1 answer

Since Jade v1.0.0 it is possible:

 mixin mixin_a p Yeah, mixin A! mixin mixin_b(mixMeIn) p Yeah, mixin B! +#{mixMeIn} +mixin_b('mixin_a') 
0
source

Source: https://habr.com/ru/post/1484924/


All Articles