我想使用 C# 调用具有多个参数的路由器。这是我正在制作的 url
var _email = UtilityConverter.Encrypt(Email);
var _userId = UtilityConverter.Encrypt(Convert.ToString(UserId));
// this.router.navigate(['search', { term: term}]);
var _subject = "Email Verification";
StringBuilder sb = new StringBuilder();
sb.Append("<html>");
sb.Append("<body>");
sb.Append("<p>Dear ,</p>");
sb.Append("<p>Please click the below link to verify your email.</p><br>");
sb.Append("<a href='http://localhost:4200/Emailverification/" + _email + "/" + _userId + "'>click here</a>");
sb.Append("<p>Sincerely,<br>-Offey</br></p>");
sb.Append("</body>");
sb.Append("</html>");
return MailUtilityHelper.SendMail(Email, _subject, sb.ToString());
我的电子邮件和用户 ID 已加密,这会导致问题。
这是我的带有多个参数的路由器
{path:'Emailverification/:email/:userid', component:EmailVerficationComponent,canActivate : [AuthguardComponent]},
任何帮助将不胜感激。在控制台中给我以下错误。