Is zonejs used by plain angular click events?

Discussão em 'Angular' iniciado por balteo, Outubro 28, 2024.

  1. balteo

    balteo Guest

    My question is about angular change detection and zonejs: is zonejs used by the (click) event below?

    @Component({
    template: `
    <button (click)="changeName()">Change name</button>
    <p>{{ name }}</p>
    `
    })
    export class AppComponent {
    name = 'John';

    changeName() {
    this.name = 'Jane';
    }
    }


    The reason behind my question is that most of the examples given to illustrate the purpose of zonejs mention setTimeout or http calls but seldom plain (click) events such as above.

    edit: any tip to set breakpoints in relevant parts of the zonejs source code will be greatly welcome.

    Continue reading...

Compartilhe esta Página