get last element of a list angularjs