mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-10 07:44:43 +00:00
parent
a0d759c613
commit
f9656dab2d
1 changed files with 2 additions and 2 deletions
|
|
@ -88,8 +88,8 @@ phonecatApp.controller('PhoneListCtrl', function ($scope) {
|
||||||
record. This property is used to order phones by age.
|
record. This property is used to order phones by age.
|
||||||
|
|
||||||
* We added a line to the controller that sets the default value of `orderProp` to `age`. If we had
|
* We added a line to the controller that sets the default value of `orderProp` to `age`. If we had
|
||||||
not set the default value here, the model would stay uninitialized until our user picks an
|
not set a default value here, the `orderBy` filter would remain uninitialized until our
|
||||||
option from the drop down menu.
|
user picked an option from the drop down menu.
|
||||||
|
|
||||||
This is a good time to talk about two-way data-binding. Notice that when the app is loaded in the
|
This is a good time to talk about two-way data-binding. Notice that when the app is loaded in the
|
||||||
browser, "Newest" is selected in the drop down menu. This is because we set `orderProp` to `'age'`
|
browser, "Newest" is selected in the drop down menu. This is because we set `orderProp` to `'age'`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue