Skip to content

Commit c6e551d

Browse files
committed
fix(README.md): docs defaultsFilter
1 parent 8dfea4c commit c6e551d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ $scope.fallback = {
450450
};
451451
```
452452
```html
453-
<li ng-repeat="order in orders | defaults: defaultValue">
453+
<li ng-repeat="order in orders | defaults: fallback">
454454
<b>id:</b> {{ order.id }},
455455
<b>name:</b> {{ order.name }},
456456
<b>shipping address:</b> {{ order.destination.zip }}
@@ -469,6 +469,11 @@ And it will cause adverse memory and performance implications.<br/>
469469
//We copy it once, and it's really cheaper
470470
$scope.ordersWithFallback = angular.copy($scope.orders);
471471
```
472+
```html
473+
<li ng-repeat="order in ordersWithFallback | defaults: fallback">
474+
<!-- ..... -->
475+
</li>
476+
```
472477
###where
473478
comparison for each element in a collection to the given properties object,<br/>
474479
returning an array of all elements that have equivalent property values.

0 commit comments

Comments
 (0)