How is the new change detection in Angular 20 handled in AppConfig?

Discussão em 'Angular' iniciado por Ronny Omnier González, Agosto 1, 2025.

  1. I'm learning Angular, and in a test project I have, I request information from Firebase, but when I launch the app, the content doesn't load unless I click on a route that takes me to the same component that loads on startup. This code is from Angular 19 and works for me, but I copied those components to a new project with Angular 20.

    import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
    import { provideRouter } from '@angular/router';

    import { routes } from './app.routes';

    export const appConfig: ApplicationConfig = {
    providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)]
    };



    Now this is the new appConfig in angular 20 and this is where I have the problem

    import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection } from '@angular/core';
    import { provideRouter } from '@angular/router';

    import { routes } from './app.routes';

    export const appConfig: ApplicationConfig = {
    providers: [
    provideBrowserGlobalErrorListeners(),
    provideZonelessChangeDetection(),
    provideRouter(routes)
    ]
    };



    Thanks for reading me

    Continue reading...

Compartilhe esta Página