You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"ng serve" requires restart when template error is fixed #25912
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 the self-closing tag.
I don't know what area this is in, I chose "compiler" because that seemed the closest.
You have not declared doThis(event), and save the HTML.
The compilation runs, and fails, due to the method not being implemented.
You 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:
You save this. The compiler will still error out, stating now that:
X [ERROR] NG9: Property 'doThis' does not exist on type 'SomeCompnent'. [plugin angular-compiler]
Nowhere in the code does it now reference the "doThis" mistake. Everything is saved.
But it won't compile anymore. It requires stopping the "ng serve" and re-running it. Then it works fine.
Please provide the exception or error you saw
X [ERROR] NG9: Property 'doThis' does not exist on type 'SomeCompnent'. [plugin angular-compiler]
Note "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.
Please provide the environment you discovered this bug in (run ng version)
changed the title [-]"ng serve" fails after implementing self-closing tags - requires restart[/-][+]"ng serve" requires restart when template error is fixed[/+]on Sep 29, 2023
Activity
[-]"ng serve" fails after implementing self-closing tags - requires restart[/-][+]"ng serve" requires restart when template error is fixed[/+]angular-automatic-lock-bot commentedon Nov 4, 2023
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.