BorisMoore / jquery-tmpl

The original official jQuery Templates plugin. This project was maintained by the jQuery team as an official jQuery plugin. It is no longer in active development, and has been superseded by JsRender.
3.23k stars 1.01k forks source link

varaible naming with @ #181

Closed withanage closed 10 years ago

withanage commented 10 years ago

i have added a name of the variable as @name, cause i need them in the jsonld.js for linked data. but there is an error.

<!DOCTYPE html>
<!-- To run the current sample code in your own environment, copy this to an html page. -->

<html>
<head>
  <script src="http://code.jquery.com/jquery.js"></script>
  <base href="http://www.jsviews.com/samples/"/>
  <link href="samples.css" rel="stylesheet"/>
  <script src="http://www.jsviews.com/download/jsviews.js"></script>
</head>
<body>

<div id="result"></div>

<script id="theTmpl" type="text/x-jsrender">
<label>Name:</label> {{:@name}}<br/>
</script>

<script>
var data = {
  "@name": "Adrian"
};

var template = $.templates("#theTmpl");

template.link("#result", data);
</script>

</body>
</html>
BorisMoore commented 10 years ago

This looks to be an issue for jsviews, not jquery-tmpl. It should go here: https://github.com/BorisMoore/jsviews/issues.