angular/packages/examples
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
..
common feat(common): disable keyvalue sorting using null compareFn (#57487) 2024-10-16 18:18:19 +00:00
core refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
forms refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
http build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
platform-browser refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
router refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
service-worker refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
test-utils refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
testing refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
upgrade refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
BUILD.bazel build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
index.html refactor: switch packages/examples to ESM-compatible http server (#48521) 2022-12-19 19:50:44 +00:00
README.md build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
tsconfig-e2e.json build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00

API Examples

This folder contains small example apps that get in-lined into our API docs. Each example contains tests for application behavior (as opposed to testing Angular's behavior) just like an Angular application developer would write.

Running the examples

# Serving individual examples (e.g. common)
yarn bazel run //packages/examples/common:devserver

# "core" examples
yarn bazel run //packages/examples/core:devserver

Running the tests

yarn bazel test //packages/examples/...