mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The keyvalue pipe sorts the entries of the input by key. This has been the subject of debate in the past (https://github.com/angular/angular/issues/42490). The core of the discussions is that it is often desirable (and perhaps expected) that they natural ordering of the input is respected. There are at least two workarounds to restore natural ordering, such as a `compareFn` that simply returns `1` or a custom pipe. However, both of these require code for pipe consumers to maintain or copy around to many places. Allowing `null` as `compareFn` and treating it as "natural order" is fairly simple to understand, backward compatible and was suggested a few times on https://github.com/angular/angular/issues/42490 where it seemed to be received well. Using `null` is also possible in templates without any component code changes. PR Close #57487 |
||
|---|---|---|
| .. | ||
| location/ts | ||
| ngComponentOutlet/ts | ||
| ngIf/ts | ||
| ngTemplateOutlet/ts | ||
| pipes/ts | ||
| BUILD.bazel | ||
| main.ts | ||
| start-server.js | ||
| test_module.ts | ||