@@ -82,32 +82,32 @@ class NgClass extends _NgClassBase {
82
82
}
83
83
84
84
/**
85
- * Dynamically style only odd rows in a list via data.
85
+ * Dynamically style only odd rows in an `ng-repeat` list. `Selector: [ng-class-odd]`
86
86
*
87
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
88
- * {@link ng.directive:ngClass ngClass}, except it works in
89
- * conjunction with `ngRepeat` and takes affect only on odd (even) rows .
87
+ * This directive works exactly as [ngClass] with regard to String, Array,
88
+ * and Map syntax for associating CSS classes with an element, but only affects odd rows in a
89
+ * list .
90
90
*
91
- * This directive can be applied only within a scope of an `ngRepeat` .
91
+ * Also see [ngClassEven] , which applies CSS classes to even rows .
92
92
*
93
- * ##Examples
94
- *
95
- * index.html:
96
- *
97
- * <li ng-repeat="name in ['John', 'Mary', 'Cate', 'Suz']">
98
- * <span ng-class-odd="'odd'" ng-class-even="'even'">
99
- * {{name}}
100
- * </span>
101
- * </li>
102
- *
103
- * style.css:
93
+ * ##Example
94
+ * Let's assume that we have a simple stylesheet that defines two CSS classes for the following
95
+ * example.
104
96
*
105
97
* .odd {
106
98
* color: red;
107
99
* }
108
100
* .even {
109
101
* color: blue;
110
102
* }
103
+ *
104
+ * The following template applies these classes to the odd and even rows respectively:
105
+ *
106
+ * <li ng-repeat="name in ['John', 'Mary', 'Cate', 'Suz']">
107
+ * <span ng-class-odd="'odd'" ng-class-even="'even'">
108
+ * {{name}}
109
+ * </span>
110
+ * </li>
111
111
*/
112
112
@Decorator (
113
113
selector: '[ng-class-odd]' ,
@@ -119,30 +119,32 @@ class NgClassOdd extends _NgClassBase {
119
119
}
120
120
121
121
/**
122
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
123
- * {@link ng.directive:ngClass ngClass}, except it works in
124
- * conjunction with `ngRepeat` and takes affect only on odd (even) rows.
122
+ * Dynamically style only even rows in an `ng-repeat` list. `Selector: [ng-class-even]`
125
123
*
126
- * This directive can be applied only within a scope of an `ngRepeat` .
124
+ * This directive works exactly as [ngClass] with regard to String, Array,
125
+ * and Map syntax for associating CSS classes with an element, but only affects even rows in a
126
+ * list.
127
127
*
128
- * ##Examples
128
+ * Also see [ngClassEven] , which applies CSS classes to even rows.
129
129
*
130
- * index.html:
131
- *
132
- * <li ng-repeat="name in ['John', 'Mary', 'Cate', 'Suz']">
133
- * <span ng-class-odd="'odd'" ng-class-even="'even'">
134
- * {{name}}
135
- * </span>
136
- * </li>
137
- *
138
- * style.css:
130
+ * ##Example
131
+ * Let's assume that we have a simple stylesheet that defines two CSS classes for the following
132
+ * example.
139
133
*
140
134
* .odd {
141
135
* color: red;
142
136
* }
143
137
* .even {
144
138
* color: blue;
145
139
* }
140
+ *
141
+ * The following template applies these classes to the odd and even rows respectively:
142
+ *
143
+ * <li ng-repeat="name in ['John', 'Mary', 'Cate', 'Suz']">
144
+ * <span ng-class-odd="'odd'" ng-class-even="'even'">
145
+ * {{name}}
146
+ * </span>
147
+ * </li>
146
148
*/
147
149
@Decorator (
148
150
selector: '[ng-class-even]' ,
0 commit comments