【发布时间】:2019-02-21 05:11:38
【问题描述】:
我在网址栏中输入了一个链接。
http://localhost:4200/reset-password-action/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9/5
我想从 url 获取 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 和 5。
我的 app-routing.module.ts 文件中有它。
const routes: Routes = [
{ path: 'reset-password-action/:token/:user_id', component: NewPasswordComponent }
];
我需要一个简单的语法来获取这些数据。
【问题讨论】:
-
你想从哪里获取这些数据?
-
暂时在当前组件中 NewPasswordComponent
标签: angular routing angular-routing