我的路线定义如下:
{
path: ':category/:topic',
component: TopicComponent,
data: ROUTE_DATA,
resolve: { topic: topicResolver },
canActivate: [topicGuard]
},
The AnalogJS documentation explains how to render routes container a single parameter. .
因此,对于单个 productid
参数,我们将定义一个如下文件:
products.[productId].page.ts
我们如何定义具有 2 个或更多参数的路由?
伪代码将是这样的:
products.[productId]/[partid].page.ts
想法?
最佳答案
您必须使用点符号来划分路径段,例如 products.[productId].[partid].page.ts
。
关于javascript - 使用 AnalogJS 渲染具有 2 个或更多路由参数的路由?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76086555/