A
A
Alex Zi2015-09-16 18:21:51
Pug
Alex Zi, 2015-09-16 18:21:51

Using object data passed to Jade mixin?

I use the front-end tars-cli collector. The value from data.js is not pulled up .
If I set an object inside the mixin, everything is ok. And with data.js it doesn’t pull up.
Mixin

mixin feature(data)
    div.feature
        h3.feature__title= data[title]

Usage
include ../modules/feature/feature

    div
        +feature(feature['item1'])

data.js
feature:{
    'item1':{
        'title':'Название',
        'num': '1',
        'descr': 'Описание'
    }
}

How should jade read the data passed to the mixin?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2015-09-16
@Zidkov

It's not about Jade, look for the author of tars and ask what he messed up there :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question