Remove the href="whatever" from the link and open the link by calling a function. This completely removes the link preview on the bottom left of the page.
HTML:
<a (click)="openUrl('https://google.com')">
JS:
openUrl(url: string): void {
window.open(url, '_blank');
}
From @Md Atiqur Rahman I added some code and make this:
const a_tags = document.querySelectorAll("a");
books.forEach((element) => {
const href = element.href;
element.removeAttribute("href");
element.addEventListener("click", () => {
openUrl(href);
});
});
function openUrl(url) {
window.open(url);
}