What analog deprecated-router
method generate
in new Router 3.0.0?
Early it can take something like this:
this._router.generate(['Profile']).urlPath;
How do it on new router?
https://angular.io/docs/ts/latest/api/router/index/Router-class.html#!#createUrlTree-anchor
var urlTree = this._router.createUrlTree(['Profile']);
You can pass the result to
this._router.navigate(/*string|UrlTree);
or get the URL
var url = this._router.createUrlTree(['Profile']).toString();
Edit: As of Angular 6, you pass the result to NavigateByUrl:
this._router.navigateByUrl(string|UrlTree);