26
rated 0 times
[
33]
[
7]
/ answers: 1 / hits: 34476
/ 12 Years ago, mon, september 17, 2012, 12:00:00
Currently in the process of converting a website from its previous templating to Angular. In the previous templating process we were using we were able to call helper methods to display data correctly. For instance:
<script type=text/javascript>
$.views.helpers({
parseDate: function (jsonDate) {
if (jsonDate != null) {
var newDate = Utils.PrettyDate(Utils.ConvertJsonDateToJsDate(jsonDate));
return newDate;
}
}
});
</script>
<div class=post-info>
<span class=posted-date>Posted {{ :~parseDate(CreatedDate) }}</span>
 | 
<span>{{ :ReplyCount }} Replies</span>
</div>
This was very nice. Trying to figure out a way to utilize the same type of functionality with Angular as far as templating goes. Is it possible to do something similar? If so how?
More From » templates