angularjs - better granularity for filter service parameter types

This commit is contained in:
Ciuca, Alexandru
2015-09-14 17:12:44 +03:00
parent 9ce3cd4ded
commit d0a264d5ff
2 changed files with 33 additions and 1 deletions
+16
View File
@@ -933,3 +933,19 @@ function NgModelControllerTyping() {
});
};
}
function ngFilterTyping() {
var $filter: angular.IFilterService;
var items: string[];
$filter("name")(items, "test");
$filter("name")(items, {name: "test"});
$filter("name")(items, (val, index, array) => {
return array;
});
$filter("name")(items, (val, index, array) => {
return array;
}, (actual, expected) => {
return actual == expected;
});
}