From 01d3cc0458f2c17a4e574e457ae514c6c0c7510f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Hyv=C3=A4rinen?= Date: Tue, 10 Feb 2015 12:52:51 +0200 Subject: [PATCH] Added IRepeatScope --- angularjs/angular.d.ts | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index f9ebda1208..5dd540aaf5 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -584,6 +584,44 @@ declare module ng { } interface IScope extends IRootScopeService { } + + /** + * $scope for ngRepeat directive. + * see https://docs.angularjs.org/api/ng/directive/ngRepeat + */ + interface IRepeatScope extends IScope { + + /** + * iterator offset of the repeated element (0..length-1). + */ + $index: number; + + /** + * true if the repeated element is first in the iterator. + */ + $first: boolean; + + /** + * true if the repeated element is between the first and last in the iterator. + */ + $middle: boolean; + + /** + * true if the repeated element is last in the iterator. + */ + $last: boolean; + + /** + * true if the iterator position $index is even (otherwise false). + */ + $even: boolean; + + /** + * true if the iterator position $index is odd (otherwise false). + */ + $odd: boolean; + + } interface IAngularEvent { /**