0

I'm using node.js with twig as template engine and I need to add some html when a button is clicked, I tried to add the include using javascript on the frontend this way

$('#add-question').on('click',function(){
        $('#questions-container').append("{% include './create-question.twig'  %}");    
})

But append the literall text, Its possible to include a twig template inside another this way or similar?

af_159623
  • 197
  • 10
  • 1
    just add this html as usual, and make them don't visible by display:none. Then just on click action change displaying to block or what you need. – Robert Oct 24 '20 at 18:44
  • Does this answer your question? [What is the difference between client-side and server-side programming?](https://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming) – DarkBee Oct 25 '20 at 08:29

0 Answers0