Im trying to redirect my page from login to another page. Im following this code.
My login component ts file:
import { Router } from \'@angular/router\';
navigateByUrl expects an absolute path, so a leading / might take you to the right page
You could also use navigate and don't need the leading / but the syntax is slightly different as it expects an array for the path
https://angular.io/api/router/Router#navigateByUrl