JQuery View Engine asic

asic sample shown how to load JSON into HTML template using JQuery View Engine

by Jovan Popovic

HTML

<script src="https://cdn.rawgit.com/JocaPC/jquery-view-engine/47dca5c7/src/jquery.view-engine.js"></script>
<div id="template">
  <h1 id="Name"></h1>
  <p class="bind-Description"></p>
  <label>Note:</label>
  <textarea name="Note"></textarea>
  <ul>
    <li class="bind-Tags"></li>
  </ul>
</div>

JavaScript

var data = {
  Name: "JQuery View Engine",
  Note: "The simplest view engine",
  Description: "JQuery View Engine can populate HTML elements using JSON object. This is the simplest way to bind JSON object into HTML template without any custom templating language.",
  Tags: ["View engine", "JavaScript", "SPA"]
};

$("#template").view(data);