Here is the solution in this situation:
var n = 0;
var next_item = "";
//act_url = :todoID (actual url)
var act_url = $stateParams.todoId;
//Actual item [key]
angular.forEach(TodosService.todos, function(todo, key) {
if (todo.id === act_url) {
n = key;
}
})
//next button
$scope.next = function (){
n = n + 1 ;
next_item = TodosService.todos[n];
$state.go('todo', { todoId: next_item.id });
}
})