angular/packages/examples/common
Sebastian Barfurth 13c13067bc feat(common): disable keyvalue sorting using null compareFn (#57487)
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
2024-10-16 18:18:19 +00:00
..
location/ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
ngComponentOutlet/ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
ngIf/ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
ngTemplateOutlet/ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
pipes/ts feat(common): disable keyvalue sorting using null compareFn (#57487) 2024-10-16 18:18:19 +00:00
BUILD.bazel refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
main.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
start-server.js refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
test_module.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00