Suppose there is such a pattern

<script id="test" type="text/html"> Test: {message} <div class="body"> {data} </div> </script> 

Here is his lively rough example https://jsfiddle.net/0ykLrsx9/

How can I update message or data ? If the data is more or less clear, just update the contents of the .body , then the message not so simple.

You can save a template in memory and overwrite it, but then all the events that are hung on the elements will die

  • Do you need a binding like an angular, for example? It is a little more difficult to build templates. - user207618
  • Sign only with vue, but yes, most likely. The source code was trying to read, but it is a little hell. Maybe there is an article dedicated to this? Not how to track the change of a variable, namely how to craft and update templates - Fangog

0