0

The value of {{bb}} is "9.00 to 10.00"

I Want to display only 9

Gopinath Kaliappan
  • 5,651
  • 8
  • 34
  • 57

2 Answers2

2

If you want to display only the first character then the simplest is to use [0]:

{{ bb[0] }}

However, if your goal is to display hour portion of the string then you could do something like this:

{{ bb.split('.')[0] }} 

and for 12.00 to 13.00 it would print 12 as expected.

dfsq
  • 187,712
  • 24
  • 229
  • 250
1

You can use ng-blur with Math.round like

ng-blur="number = Math.round(number)"

You can also use filter components in ng / number

Tushar
  • 13,804
  • 1
  • 24
  • 44