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
fetch HttpClient + signals is not triggering cdr #25985
import { ChangeDetectorRef } from '@angular/core';
// Inside your component constructor or method
constructor(private cd: ChangeDetectorRef) { }
// Inside your HTTP request subscription or switchMap
this.http.get('your-url').subscribe((data) => {
// Process data
// Trigger change detection
this.cd.detectChanges();
});
Activity
JeanMeche commentedon Oct 8, 2023
Well, thank you for reporting that,
Fails miserably when using the
FetchBackendEdit: This bug only happens with the
browser-esbuildbuilder.surajy93 commentedon Oct 8, 2023
import { ChangeDetectorRef } from '@angular/core';
// Inside your component constructor or method
constructor(private cd: ChangeDetectorRef) { }
// Inside your HTTP request subscription or switchMap
this.http.get('your-url').subscribe((data) => {
// Process data
// Trigger change detection
this.cd.detectChanges();
});
JeanMeche commentedon Oct 8, 2023
cc @alan-agius4 If you have any idea why the builder changes the behaviour we can observe here.
Edit: it's getting weirder every time i try to look into it, it seems to be caching related in serve mode.
alan-agius4 commentedon Oct 9, 2023
Yeah, I know what is going on. I'll open a PR later today.
fix(@angular-devkit/build-angular): fully downlevel async/await when …
fix(@angular-devkit/build-angular): fully downlevel async/await when …
fix(@angular-devkit/build-angular): fully downlevel async/await when …
fix(@angular-devkit/build-angular): fully downlevel async/await when …
angular-automatic-lock-bot commentedon Nov 9, 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.