DomTemplate Example

In this example, the entire 'p' element has been removed by processing the if attribute.

HTML

<script src="https://github.com/PAEz/domtemplate/raw/master/lib/domtemplate.js"></script>
    <div id="ex6">
      <p if="${name}">Hi, ${name}</p>
    </div>

JavaScript

template('ex6', {
    name: null
});