You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/tutorial/step_04.ngdoc
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,18 @@ text.
180
180
181
181
* Reverse the sort order by adding a `-` symbol before the sorting value: `<option value="-age">Oldest</option>`
182
182
183
+
* Now use a dedicated input field to reverse the sort order. Angular accepts a boolean value as second parameter to the filter (`orderBy:orderProp:orderReverse`), so you should name your input field accordingly
184
+
185
+
__`app/index.html`__
186
+
<pre>
187
+
...
188
+
<select ng-model="orderReverse" class="span12">
189
+
<option value="false">Ascending</option>
190
+
<option value="true">Descending</option>
191
+
</select>
192
+
...
193
+
</pre>
194
+
183
195
# Summary
184
196
185
197
Now that you have added list sorting and tested the app, go to {@link step_05 step 5} to learn
0 commit comments