S
S
squadbrodyaga2020-12-21 12:23:40
HTML
squadbrodyaga, 2020-12-21 12:23:40

How to make a popup using handlebars?

Hello, in general, I decided to make a popup, and with the help of handlebars make it a "shell" in order to use it
somehow like this: I create a popup.hbs

file in the partials folder

<div class="popup-bg">
  <div class="popup-container">
    // вот тут должен быть контент popup'a
  </div>
</div>

And where I want to make a popup, I just paste it like this:
// какой-то код...
{{>popup}}
// какой-то код...

But now I have inserted just an empty popup-container on the page, but is it possible to somehow insert content into it?
Like it would look something like this:
{{>popup}}
  // и сюда писать код, который будет внутри popup-container 
{{/popup}}

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