【发布时间】:2021-10-14 23:16:26
【问题描述】:
我有一个类似于http://www.example.com/idf34he8sf/9iad2hf7usnf 的网址。我想获取参数idf34he8sf 和9iad2hf7usnf
我用过下面的代码
角度
this.route.paramMap.subscribe(params => {
this.organizationId = params.get("organizationId");
this.embedId= params.get("embedId");
}
在节点中
req.params
和
req.originalUrl
我想获取参数idf34he8sf 和9iad2hf7usnf
【问题讨论】:
-
你想在节点中获取参数?
-
U 使用的是哪个版本的 Angular?
-
@SaurabhMistry 我需要在节点和角度中获取参数。
-
@Mohit 我正在使用 Angular7。