How to navigate dynamically to path or page from ts(class)? Basic angular interview question
Jun 7, 2023
To navigate programmatically you need inject router service then call navigate function
import {Router} from '@angular/common/router'
.
.
.
constructor(private router: Router){}
.....
//in some method
....
.
.
.
this.router.navigate(['/property']);