In this case, the standard filter is used , which filters the transferred array.
What happens in your code:
You have a function that returns a function.
$scope.getStatus = function (item) { ... return function (item) { return item; }; }
And the returned function does not depend on the code that came before it. It is quite simple - it returns the argument passed.
When the getStatus function is getStatus in the view, it returns the function that is used as a predicate for the standard filter , if this function returns truthly value - then the element remains, if falsey - then not.
Thus, the standard filter follows the characters of the string "true", as in an array, and each character passes to the predicate function.
This function returns this character back, filter brings the character to a boolean value and, since any character matches true , it leaves it.
Thus, after the end of the work filter there is an array with string characters.
What can be done: use the function directly, as in the next answer, or write your own filter, for example
angular.module('app')// ваш модуль .filter('getStatus',function(){ return function(item){ switch (item) { case "true": return "Открыт"; case "false":return "Закрыт"; case "wait":return "Ожидает ответа"; case "ok":return "Отвечен"; } } });
And use
{{item.active | getStatus }}
Or even remove the function and use the object, for example
$scope.statuses = { "true": "Открыт", "false":"Закрыт", "wait":"Ожидает ответа", "ok":"Отвечен" }
and use as
{{ statuses[item.active] }}