Я использую Angular 6, тему ngx-admin с аутентификацией.Я хочу передать идентификатор токена в URL для сброса пароля и получить этот идентификатор в форме пароля для сброса, чтобы я мог передать его на внутренний сервер.Ниже приведен мой файл app-routing.module.ts:
{
path: 'auth',
component: NgxAuthComponent,
children: [
{
path: '',
component: NgxLoginComponent,
},
{
path: 'request-password',
component: NgxRequestPasswordComponent,
},
{
path: 'reset-password/:token',//here i need token
component: NgxResetPasswordComponent,
},
. Ниже приведен файл NgxResetPasswordComponent:
constructor(protected service: NbAuthService,
@Inject(NB_AUTH_OPTIONS) protected config = {},
protected router: Router) {
this.redirectDelay = this.getConfigValue('forms.resetPassword.redirectDelay');
this.showMessages = this.getConfigValue('forms.resetPassword.showMessages');
this.provider = this.getConfigValue('forms.resetPassword.provider');
console.log(this.router.url);//output: /auth/reset-password/dsadasdasfaf
}
Мне нужно получить «dsadasdasfaf» с этого URL и передать егоформа.