I am developing inbox for messages with AngularJs, and I came across one issue: I want to show only last element within ng-repeat. I did some research, and found ou
ng-repeat
You could use limitTo filter with -1
limitTo
-1
Example :
{{friend.name}}
See fiddle
But if you are showing only one element, maybe you want to get rid of the ng-repeat... :
{{friends[friends.length - 1].name}}