You can inject Router from ‘@angular/router’ and get the current route you’re on.
For example:
// mycomponent.component.ts
class MyComponent {
constructor(public router: Router) {
}
}
// mycomponent.component.html
<div *ngIf="router.url === '/some/route'">
</div>