I am trying to format the string in the HTML. This is my html Sample
<tr ng-repeat="dob in userId.dobs">
<td align="center">{{$index + 1}}</td>
<td>{{dob.dateType}}</td>
<td>{{dob.birthDate}}</td>
<td>{{dob.dateYear}}</td>
<td>{{dob.fromYear}}</td>
<td>{{dob.toYear}}</td>
</tr>
Currently my {{dob.fromYear}}show like 1973/01/21. But I need to split this string and keep only the year. Its like below {{dob.fromYear}} show like 1973. I tried to do it using below technique
<td>{{dob.fromYear.split('/')}}</td>
now my result like ["1973","01","21"]

I need to display only the year. How i do it.?