Condition based router-outlet not changing its content on url change in app.component.html in angular
问题 In app.component.html , there is condition based template.. My problem is condition in ngif matches(but url changes) , then router-outlet do not change its content but if condition do not matches then content changes. Below is my code app.component.html <app-web-header></app-web-header> <div *ngIf="isAdminComponent"> <app-home ></app-home> </div> <div *ngIf="!isAdminComponent"> <app-user-home></app-user-home> </div> <app-web-footer></app-web-footer> app.component.ts import { Component, Inject