【发布时间】:2020-01-11 06:07:29
【问题描述】:
我需要检查我的收入 URL 是否是特定格式,然后打开模态并做一些事情。我用这段代码来做这个:
route.queryParams.subscribe(async params => {
if (!isNaN(params.rt)) {
console.log("URL Match");
this.show = true;
} else {
console.log("URL does not Match");
}
});
我的格式应该是这样的:
www.example.com?=123456
但我需要如果完成模态过程,删除查询参数从 url
【问题讨论】:
标签: angular typescript url angular-routing