Angular Add Elipseis to modelo string

// How to truncate a string in Angular

<td *matCellDef="let animal">
	{{ (animal.name.length > 20) ? (animal.name | slice:0:20) + '...' : animal.name }}
</td>
Banana in Transit