#7689 closed bug (worksforme)
$.format doesn't work inside {{= }}
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.6 |
Component: | templates | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The summary basically says it all. You can say:
{{= format(...) }}
Where format is simply a function defined to simply call $.format. But you cannot say:
{{= $.format(...) }}
This seems odd that two plugins both developed by the same people conflict in this way.
Change History (4)
comment:1 Changed 12 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | pending → closed |
Perhaps you're using an old version of tmpl? https://github.com/jquery/jquery-tmpl
Using both the {{=}} and ${} notation, the expression runs as expected.
Demo: http://jsfiddle.net/danheberden/CC5Qy/
Also, it's worth noting the additional variables available inside of ${} - see http://api.jquery.com/template-tag-equal/ (The $item and $data Template Variables heading)
comment:3 Changed 12 years ago by
Cheers, i can confirm this works with latest version. I was using the one hosted on the Microsoft CDN.
comment:4 Changed 12 years ago by
Component: | unfiled → templates |
---|
Thanks for taking the time to contribute to the jQuery project by writing a bug report.
We require that all bug reports include a valid reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net. This enables us to more easily investigate this issue further.