Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7689 closed bug (worksforme)

$.format doesn't work inside {{= }}

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: 1.6
Component: templates Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


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 jitter

Owner: set to [email protected]
Status: newpending

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.

comment:2 Changed 12 years ago by danheberden

Resolution: worksforme
Status: pendingclosed

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)

Last edited 12 years ago by danheberden (previous) (diff)

comment:3 Changed 12 years ago by anonymous

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 jitter

Component: unfiledtemplates
Note: See TracTickets for help on using tickets.