In the js template engine, where does all this data come from?

In the

js template engine, where does the data come from and how the page does not have the variable isAdmin? you can refer to

directly.

< script id= "content" type= "text/html" >

{{if isAdmin}}
    <h1>{{title}}</h1>
    <ul>
        {{each list as value index}}
           <li>:{{index}}:{{value}}</li>
        {{/each}}
    </ul>
{{/if}}

< / script >

Mar.15,2021

var innerHtmlStr = template.render('id', data);// 

We all know that it is a template engine. Just search for it. The data comes from this incoming data~

.

traverse the generated ast, and then assign it, and then restore


injected


https://blog.csdn.net/xuexuan. search

Menu