angular/packages
Andrew Scott 02a539cb14 refactor(core): Synchronously emit the current signal value in toObservable (#49894)
As described in
https://github.com/angular/angular/discussions/49681#discussioncomment-5628930,
if an `Observable` created from a signal with `toObservable` is
subscribed to in a template, it will initially have `null` as the value.
Immediately after the template is done executing, effects are flushed
and this results in the `AsyncPipe` getting a new value before the
`checkNoChanges` pass, resulting in `ExpressionChanged` error.

```
template: '{{obs$ | async}}'
...
obs$ = toObservable(signal(0));
```

Instead, this commit updates the `toObservable` to synchronously emit
the initial value to the Observable stream.

Side note here: We don't exactly encourage this pattern. Instead of
using `AsyncPipe`, the template should just read signals.

PR Close #49894
2023-04-25 09:27:38 -07:00
..
animations refactor(platform-browser): log a warning when a custom or a noop ZoneJS is used with hydration (#49944) 2023-04-23 18:23:28 -07:00
bazel build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
benchpress refactor(core): Remove ReflectiveInjector symbol (#48103) 2023-04-04 16:43:53 -07:00
common docs: remove mention of the webworker platform issues (#49947) 2023-04-23 18:20:58 -07:00
compiler refactor(compiler): next context merging in the template pipeline (#49797) 2023-04-18 17:00:51 +00:00
compiler-cli refactor(compiler-cli): remove unecessary type assertion (#49971) 2023-04-24 11:51:18 -07:00
core refactor(core): Synchronously emit the current signal value in toObservable (#49894) 2023-04-25 09:27:38 -07:00
docs/di docs: remove outdated/unsupported webworker doc (#49856) 2023-04-17 14:01:41 +00:00
elements build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
examples refactor(core): Remove ReflectiveInjector symbol (#48103) 2023-04-04 16:43:53 -07:00
forms build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
language-service build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
localize build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
misc/angular-in-memory-web-api build: update angular-in-memory-web-api to work with ESM (#48521) 2022-12-19 19:50:42 +00:00
platform-browser refactor(platform-browser): log a warning when a custom or a noop ZoneJS is used with hydration (#49944) 2023-04-23 18:23:28 -07:00
platform-browser-dynamic refactor(platform-browser): cleanup references to dart (#49858) 2023-04-18 14:00:45 +00:00
platform-server refactor(platform-browser): log a warning when a custom or a noop ZoneJS is used with hydration (#49944) 2023-04-23 18:23:28 -07:00
private/testing fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
router refactor(router): remove targetPageId from transition (#49799) 2023-04-17 17:36:02 +00:00
service-worker build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
upgrade build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771) 2023-04-11 07:56:31 -07:00
zone.js build: update dependency google-closure-compiler to v20230411 (#49892) 2023-04-18 19:07:14 +00:00
BUILD.bazel build(bazel): list docs entrypoints under packages to simplify docgen 2022-11-22 13:51:16 -07:00
circular-deps-test.conf.js build: ignore type only imports/exports for circular dependency checks (#47017) 2022-08-18 12:06:09 -07:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt build: bump license year (#44590) 2022-01-04 12:05:25 -08:00
README.md
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build.json build: update ts_library to produce ES2022 (#49559) 2023-03-23 08:18:45 -07:00
tsconfig-legacy-saucelabs.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsconfig-test.json build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tsconfig-tsec-base.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig.json refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268) 2023-02-21 13:03:59 -08:00
tsec-exemption.json fix(core): hardening attribute and property binding rules for <iframe> elements (#47964) 2022-11-09 00:47:56 -08:00
types.d.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT