如何将动态代码从URL添加到API的末尾?
const routes: Routes = [
{ path: '', redirectTo: '/', pathMatch: 'full'},
{
path: 'survey-response-handler/:surveyCode',
loadChildren: () =>
import('./responses/responses.module').then(
(m) => m.ResponsesModule
),
component: SurveyResponseHandlerComponent
}
这是我的app.routing.module.ts。如何将URL末尾输入的代码添加到API?
const routes: Routes = [
{ path: '', redirectTo: '/', pathMatch: 'full'},
{
path: 'survey-response-handler/:surveyCode',
loadChildren: () =>
import('./responses/responses.module').then(
(m) => m.ResponsesModule
),
component: SurveyResponseHandlerComponent
}
This is my app.routing.module.ts. How can I add the code entered at the end of url to the api?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过Angular
activatedRoute
服务查看URL参数:You can watch for the URL params via angular
ActivatedRoute
service: