IWI IWI - 5 months ago 46
AngularJS Question

AngularJS and Handlebars limit outputted string length

I am displaying a

with 2 handlebar templates inside and I would like to limit the string length of the first template
to 12 characters. Is there a way to do that? I have seen a way to limit the length on an
as well as when there is only 1 variable output.


<p class="future-appointments-info-holder-text-secondary">
{{person.activeReferralsDate}} | {{person.activeReferralsTime}}

TL;DR - I want
to be limited to 12 characters in output length


You can use limitTo

{{person.activeReferralsDate  | limitTo: 12 }}