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

Template does not work with hyphen (-) in key #163

Closed TheCodeBuccaneer closed 12 years ago

TheCodeBuccaneer commented 12 years ago

I have a json array with the key 'BASIS-TYPE'. If I use this value in the markup:

markup="${_id}${BASIS-TYPE}";

it will look for 'BASIS' and not 'BASIS-TYPE', throwing the error:

Uncaught ReferenceError: BASIS is not defined

Is there any solution to this?

rdworth commented 12 years ago

Please note the messages at the top of this page https://github.com/jquery/jquery-tmpl as well as at the top of this page https://github.com/jquery/jquery-tmpl/blob/master/README.md

TheCodeBuccaneer commented 12 years ago

Sorry, too eager to find the issue I guess :)