Title: `subscribe` is not called on `value` in `FormValueControl` · Issue #71679 · angular/angular · GitHub
Open Graph Title: `subscribe` is not called on `value` in `FormValueControl` · Issue #71679 · angular/angular
X Title: `subscribe` is not called on `value` in `FormValueControl` · Issue #71679 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Please take a look at the following code: Details import { Component, OnInit, signal, model } from '@angular/core'; import { bootstrapAppli...
Open Graph Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Please take a look at the following code: Details import { Component, OnInit, signal, model } from ...
X Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Please take a look at the following code: Details import { Component, OnInit, signal, model } from ...
Opengraph URL: https://github.com/angular/angular/issues/71679
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`subscribe` is not called on `value` in `FormValueControl`","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nforms\n\n### Is this a regression?\n\nNo\n\n### Description\n\nPlease take a look at the following code:\n\n\u003cdetails>\n\n```typescript\nimport { Component, OnInit, signal, model } from '@angular/core';\nimport { bootstrapApplication } from '@angular/platform-browser';\nimport { FormField, FormValueControl, form } from '@angular/forms/signals';\n\ninterface TestFormInterface {\n text: string;\n}\n\n@Component({\n selector: 'app-control',\n template: `\n \u003cspan>Current value {{ value() }}\u003c/span>\n \u003cbutton (click)=\"updateValue()\">Update value\u003c/button>\n `,\n})\nexport class Control implements OnInit, FormValueControl\u003cstring> {\n public readonly value = model\u003cstring>(\"\");\n\n ngOnInit(): void {\n this.value.subscribe((value) => {\n console.log(`Changed to ${value}`);\n })\n }\n\n protected updateValue(): void {\n this.value.set(\"Second\");\n }\n}\n\n@Component({\n imports: [\n Control,\n FormField,\n ],\n selector: 'app-root',\n template: `\n \u003capp-control [formField]=\"testForm.text\" />\n \u003cbutton (click)=\"updateForm()\">Update form\u003c/button>\n \u003cbutton (click)=\"log()\">Log\u003c/button>\n `,\n})\nexport class App {\n private readonly testFormModel = signal\u003cTestFormInterface>({\n text : \"First\",\n });\n protected readonly testForm = form(this.testFormModel, (schemaPath) => {});\n\n protected updateForm(): void {\n this.testFormModel.set({\n text: \"Third\",\n });\n }\n\n protected log(): void {\n console.log(this.testFormModel());\n }\n}\n\nbootstrapApplication(App);\n```\n\u003c/details>\n\nIt implements a custom `FormValueControl` for Signal Forms which displays the value.\n\nThe example has 3 buttons:\n- `Update value`: This is part of the control. It updates the value directly.\n- `Update form`: Updates the value that is used in the control through the form.\n- `Log`: This prints the value of the form on the console.\n\nThe custom control subscribes to the changes to the value and print every changes.\n\nIf you click `Update value` the value is changes and the `subscribe` callback is called.\n\nIf you click `Update form` the value is changes and the `subscribe` callback is **not** called.\n\nSo the value is changed in both, but updating the value through the form doesn't call the `subscribe` callback. This causes problems if you need to run custom code when the value changes.\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/stackblitz-starters-2phczcey\n\n### Please provide the exception or error you saw\n\n```true\n\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI : 22.2.4\nAngular : 22.2.3\nNode.js : 26.4.0\nPackage Manager : npm 11.17.0\nOperating System : darwin arm64\n\n┌───────────────────────────┬───────────────────┬───────────────────┐\n│ Package │ Installed Version │ Requested Version │\n├───────────────────────────┼───────────────────┼───────────────────┤\n│ @angular/build │ 22.2.4 │ ^22.2.3 │\n│ @angular/cli │ 22.2.4 │ ^22.2.3 │\n│ @angular/common │ 22.2.3 │ ^22.2.3 │\n│ @angular/compiler │ 22.2.3 │ ^22.2.3 │\n│ @angular/compiler-cli │ 22.2.3 │ ^22.2.3 │\n│ @angular/core │ 22.2.3 │ ^22.2.3 │\n│ @angular/forms │ 22.2.3 │ ^22.2.3 │\n│ @angular/platform-browser │ 22.2.3 │ ^22.2.3 │\n│ @angular/router │ 22.2.3 │ ^22.2.3 │\n│ rxjs │ 7.8.2 │ ^7.8.1 │\n│ typescript │ 6.0.3 │ ^6.0.2 │\n└───────────────────────────┴───────────────────┴───────────────────┘\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/JakobDev","@type":"Person","name":"JakobDev"},"datePublished":"2026-10-28T10:13:33Z","url":"https://github.com/angular/angular/issues/71679"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5c0c928b-3232-8f36-607d-030e3c084b0f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0E2:38E318:2ACE003:36350CB:6B01DF92 |
| html-safe-nonce | eababc2f3706df5807366dd6300c3c4e26318fd984b13819f7ca246dc6cf9616 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEUyOjM4RTMxODoyQUNFMDAzOjM2MzUwQ0I6NkIwMURGOTIiLCJ2aXNpdG9yX2lkIjoiOTE0NjA4NzA3NDI3NTkwOTUyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b947ea7612ffb79e2c498e0915d9f71b9a5aa5eea1dbaf139f65ee695de7460d |
| hovercard-subject-tag | issue:6076867501 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/71679/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93e3a70ccb9e9dd4d6b13c3930b611fdf80e5626b6a9c9d56e47c0d1de9347bc/angular/angular/issues/71679 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93e3a70ccb9e9dd4d6b13c3930b611fdf80e5626b6a9c9d56e47c0d1de9347bc/angular/angular/issues/71679 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description Please take a look at the following code: Details import { Component, OnInit, signal, model } from ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JakobDev |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width