Consider this object that returns from an internal CMS
export declare interface ContentItem {
id: string;
title: string;
subTitle: string;
clickUrl: string;
imageUrl: string;
contentType: string;
...
}
The clickUrl will have a complete url that navigate to valid angular route. I was looking for a way to use this url in routerLink directive; something like this
<a [routerLink]="contentItem.clickUrl">click me</a>
My problem is when this url contains a query params. The directive will escape '?', '=' and '&' characters from the url.
I know that we can pass query params like this:
[queryParams]="{ articleId: contentItem.id }"
However, This does not work without stripping the query params part from clickUrl previously mentioned.