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
HMR Angular DOM Interpolation stop working after first save #59559
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
Used to work in previous versions
Description
On a fresh Angular app (19.1.0) I created a new component with a single variable i, which is displayed in the UI along with two buttons to increment/decrement the value of i. Functionality works until the HTML file is saved at which point I am able to see a log of the variable updating, however the value is not updated in the browser
Please provide a link to a minimal reproduction of the bug
Generate a new component:
ng generate component counter
Replace the content of the generated files with the following code:
counter.component.ts
import{Component}from'@angular/core';
@Component({selector: 'app-counter',templateUrl: './counter.component.html',styleUrls: ['./counter.component.css']})exportclassCounterComponent{i: number=0;// The counter variableincrement(){this.i++;console.log('Incremented:',this.i);}decrement(){this.i--;console.log('Decremented:',this.i);}}
counter.component.html
<divstyle="text-align: center;"><h1>Counter Component</h1><p>Current Value: {{ i }}</p><button(click)="increment()">Increment</button><button(click)="decrement()">Decrement</button></div>
Please provide the environment you discovered this bug in (run ng version)
Activity
[-]DOM does not update after first save[/-][+]HMR Angular DOM Interpolation stop working after first save[/+]alan-agius4 commentedon Jan 16, 2025
Transferring to the FW as this is a runtime issues.
fix(core): run HMR replacement in the zone
fix(core): run HMR replacement in the zone (#59562)
fix(core): run HMR replacement in the zone (angular#59562)
fix(core): run HMR replacement in the zone (angular#59562)
angular-automatic-lock-bot commentedon Feb 16, 2025
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.