I'm currently working on a project that requires me to retrieve a string value (GUID) and convert it into a GUID.
The query string format is already in GUID, but when getting the value from the query string using AngularJS and TypeScript, it returns as a string.
How can I convert this string to a GUID?
URL:
https://localhost:44326/search?criteria=apparel&categoryId=c24dee00-ba9d-4af5-b357-a5b20033e5a7
TypeScript/Angular Code
export class Test
{
categoryId: System.Guid;
init(): void {
this.categoryId = this.queryString.get("categoryId");
}
}
Upon executing the Init() function, an error occurs where the categoryId ends up empty without setting the query string value.