Calling typeof operator in jQuery Template data tags? -
Is it possible to call i what you want to be a string One or both of these should work in most browsers: typeof (x) within a data rendering template tag?
$ {typeof (x)}
workaround
typeof < / Code> operator works as a custom template function and it works fine, but I want to avoid the extra level of additional redirection if I can.
// javascript $ calling ("# reflectTemplate"). Tmpl (data, {getType: function (itemToCheck)} {return typeof (itemToCheck);}}) .Andendo ("result"); & Lt ;! - Template tag - & gt; $ {$ Item.getType (prop)}
$ {string (prop ())} $ {typeof (prop) + '}} < / Pre>
Comments
Post a Comment