S
S
svilkov872019-03-23 16:49:13
Pug
svilkov87, 2019-03-23 16:49:13

How to correctly pass parameters to pug?

Hello!
There is a js file in which I include the pug template:

var $blockWithPapams = require('block.pug')({
        hosting: {
            title: 'title',
            content: content, // тут я что-то передаю пагу ( не просто текст, а например html или какой-то блок )
        },
    });

And pug itself:
div.block
  p.self.title
  div.content
    //  а тут мне нужно вывести content, переданный из js

How to pass data to pug correctly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question