How to reset/refresh tab body data in Angular Material if user move from one tab to another...

Discussão em 'Angular' iniciado por Prashant Pimpale, Maio 22, 2025.

  1. Here is my sample code

    Main Controller

    <mat-tab-group id="report">
    <mat-tab label="Poll">
    <div class="demo-tab-content">
    <app-poll></app-poll>
    </div>

    </mat-tab>
    <mat-tab label="Survey">
    <div class="demo-tab-content">
    <app-survey></app-survey>
    </div>
    </mat-tab>



    In each tab, there is different controller named - Poll and Survey. Here I want to refresh\reset one tab data if the user moves from one to another.

    Any simple way to achieve that?

    Continue reading...

Compartilhe esta Página