Reputation: 735
I can't get the following to work
{[displayDate(dateRelease);]}
Each model from the store has the property "dateRelease"
I need to get that date and transform it with my displayDate() before displaying it.
When I write the code, I get the error that dateRelease is not found.
How should I proceed?
Upvotes: 0
Views: 75
Reputation: 1008
See this question.
For your example it would look like:
itemTpl: new XTemplate(
'<tpl>',
'<p>{[this.displayDate(dateRelease)]}</p>',
'</tpl>',
{
displayDate: function(date){
return runFunction(date);
}
}
);
I have not tested this syntax so there may be a typo.
Upvotes: 0