Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS append text to ng-bind with filter

I have this code (output=1,000):

<span ng-bind"item.num | number : 0"></span>

But i want something like 1,000 km. Any way to do this without create a new span.

Something like this isn't working:

<span ng-bind"item.num + ' km' | number : 0"></span>
like image 314
Christopher Avatar asked Aug 10 '15 15:08

Christopher


1 Answers

<span ng-bind="(input | filter) + 'km'"></span>
like image 81
André Tiago Avatar answered Sep 27 '22 18:09

André Tiago