Title: "ng serve" requires restart when template error is fixed · Issue #25912 · angular/angular-cli · GitHub
Open Graph Title: "ng serve" requires restart when template error is fixed · Issue #25912 · angular/angular-cli
X Title: "ng serve" requires restart when template error is fixed · Issue #25912 · angular/angular-cli
Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description If we change a component to a self-closing tag after another error has occured during compilation, it refuses to pick up the changes to...
Open Graph Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description If we change a component to a self-closing tag after another error has occured during compilati...
X Description: Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description If we change a component to a self-closing tag after another error has occured during compilati...
Opengraph URL: https://github.com/angular/angular-cli/issues/25912
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"ng serve\" requires restart when template error is fixed","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\ncompiler\r\n\r\n### Is this a regression?\r\n\r\nYes\r\n\r\n### Description\r\n\r\nIf we change a component to a self-closing tag after another error has occured during compilation, it refuses to pick up the changes to the self-closing tag.\r\n\r\nI don't know what area this is in, I chose \"compiler\" because that seemed the closest.\r\n\r\nExample:\r\n\r\nYou call the wrong method in a component:\r\n\r\n`\u003csome-component (onClick)=\"doThis($event)\">\u003c/some-component>`\r\n\r\nYou have not declared `doThis(event)`, and save the HTML.\r\n\r\nThe compilation runs, and fails, due to the method not being implemented.\r\n\r\nYou realize this was supposed to call \"doSomething\", and then return to the component to make your changes. At the same time, you realize it can use Angular 16's new self-closing tags:\r\n\r\n`\u003csome-component (onClick)=\"doSomething($event)\" />`\r\n\r\nYou save this. The compiler will still error out, stating now that:\r\n\r\n> X [ERROR] NG9: Property 'doThis' does not exist on type 'SomeCompnent'. [plugin angular-compiler]\r\n\r\nNowhere in the code does it now reference the \"doThis\" mistake. Everything is saved.\r\n\r\nBut it won't compile anymore. It requires stopping the \"`ng serve`\" and re-running it. Then it works fine.\r\n\r\n### Please provide the exception or error you saw\r\n\r\n> X [ERROR] NG9: Property 'doThis' does not exist on type 'SomeCompnent'. [plugin angular-compiler]\r\n\r\nNote \"`doThis`\" does not exist in the HTML anymore. The file has been saved. When the compiler runs again, it complains about this. The HTML now contains `doSomething()`, the correct call. It is seeing the older version.\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```\r\n@angular-devkit/architect 0.1602.0\r\n@angular-devkit/build-angular 16.2.0\r\n@angular-devkit/core 16.2.0\r\n@angular-devkit/schematics 16.2.0\r\n@angular/cdk 16.2.1\r\n@angular/cli 16.2.0\r\n@schematics/angular 16.2.0\r\nrxjs 7.8.1\r\ntypescript 5.0.4\r\nzone.js 0.13.1\r\n```\r\n### Anything else?\r\n\r\nNope.","author":{"url":"https://github.com/psarno","@type":"Person","name":"psarno"},"datePublished":"2023-09-27T16:08:06Z","url":"https://github.com/angular/angular-cli/issues/25912"}
| 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:e52f3bcb-8fe9-7742-0fdd-5e10483fe655 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB00:3E418A:11BA987:175739C:6B01E44B |
| html-safe-nonce | 3592b63f56a8dce112d022de19a9c213cca16d101af823eb1cdb9e5416db08af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjAwOjNFNDE4QToxMUJBOTg3OjE3NTczOUM6NkIwMUU0NEIiLCJ2aXNpdG9yX2lkIjoiNTU3MzQ3Njk5NjIxMTY2Mzk0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8b5e728585098afd19ef9b45c7013c2aaca481132baa03cead2d3486168d2e65 |
| hovercard-subject-tag | issue:1915968876 |
| 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-cli/25912/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa398d0dd6efed4c187bf9c4deb4a741baa4de707eff1977a8c302f0c4278f7d/angular/angular-cli/issues/25912 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa398d0dd6efed4c187bf9c4deb4a741baa4de707eff1977a8c302f0c4278f7d/angular/angular-cli/issues/25912 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? compiler Is this a regression? Yes Description If we change a component to a self-closing tag after another error has occured during compilati... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | psarno |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| 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