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 1/2] 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 { /** From 8c30472a68695c87fe941a7c28efb80a2e121923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Hyv=C3=A4rinen?= Date: Tue, 10 Feb 2015 14:06:32 +0200 Subject: [PATCH 2/2] indentation --- angularjs/angular.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index 5dd540aaf5..d764bec6bc 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -589,37 +589,37 @@ declare module ng { * $scope for ngRepeat directive. * see https://docs.angularjs.org/api/ng/directive/ngRepeat */ - interface IRepeatScope extends IScope { + interface IRepeatScope extends IScope { /** * iterator offset of the repeated element (0..length-1). */ - $index: number; + $index: number; /** * true if the repeated element is first in the iterator. */ - $first: boolean; + $first: boolean; /** * true if the repeated element is between the first and last in the iterator. */ - $middle: boolean; + $middle: boolean; /** * true if the repeated element is last in the iterator. */ - $last: boolean; + $last: boolean; /** * true if the iterator position $index is even (otherwise false). */ - $even: boolean; + $even: boolean; /** * true if the iterator position $index is odd (otherwise false). */ - $odd: boolean; + $odd: boolean; }