template String|Function
The template which renders the content of the badge.
Example - string template
<button>Button <span id="badge"></span></button>
<script>
$('#badge').kendoBadge({
data: {
current: 2,
total: 10
},
themeColor: 'primary',
template: '#= current # of #= total #'
});
</script>
Example - function template
<button>Button <span id="badge"></span></button>
<script>
$('#badge').kendoBadge({
text: 1234,
themeColor: 'primary',
template: function() {
var text = this.options.text;
return text > 99 ? 'A lot' : text;
}
});
</script>