Skip to content

Commit 30d5559

Browse files
author
Ronald Brachetti
committed
improve doc in step 4 to include a proper input field
1 parent 3bc4e7f commit 30d5559

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/content/tutorial/step_04.ngdoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,18 @@ text.
180180

181181
* Reverse the sort order by adding a `-` symbol before the sorting value: `<option value="-age">Oldest</option>`
182182

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+
183195
# Summary
184196

185197
Now that you have added list sorting and tested the app, go to {@link step_05 step 5} to learn

0 commit comments

Comments
 (0)