import { Component, inject } from '@angular/core'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; @Component({ selector: 'app-contact-us', standalone: true, template: `<a [href]="emailLink" target="_blank">Send Email</a>`, styleUrls: ['./contact-us.component.scss'] }) export class ContactUsComponent { email = 'mailto:myemail@gmail.com'; sanitizer = inject(DomSanitizer); constructor() { this.emailLink = this.sanitizer.bypassSecurityTrustUrl(this.email); } } using this code not able execute properly, I try to create where I use window.location.href. I tried several methods but not able to execute using AI also not able to understand why It is not working browser also update the security and angular having security updates not able to understand why it is not working. Continue reading...