Calling typeof operator in jQuery Template data tags? -


Is it possible to call typeof (x) within a data rendering template tag?

  $ {typeof (x)}   

workaround

i 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)}    

what you want to be a string One or both of these should work in most browsers:

  $ {string (prop ())} $ {typeof (prop) + '}}  < / Pre>  

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -