diff --git a/modules/angular2/src/facade/collection.dart b/modules/angular2/src/facade/collection.dart index 60efec009c..17b8e534d7 100644 --- a/modules/angular2/src/facade/collection.dart +++ b/modules/angular2/src/facade/collection.dart @@ -94,6 +94,9 @@ class ListWrapper { static bool contains(List m, k) => m.contains(k); static List map(list, fn(item)) => list.map(fn).toList(); static List filter(List list, bool fn(item)) => list.where(fn).toList(); + static int indexOf(List list, value, [int startIndex = 0]) => list.indexOf(value, startIndex); + static int lastIndexOf(List list, value, [int startIndex = null]) => + list.lastIndexOf(value, startIndex == null ? list.length : startIndex); static find(List list, bool fn(item)) => list.firstWhere(fn, orElse: () => null); static bool any(List list, bool fn(item)) => list.any(fn);