Skip to content

joejordanbrown/ngx-email-obfuscation

Repository files navigation

Angular Email Obfuscation

npm GitHub license GitHub issues

Email Address Obfuscation helps to prevent spam by hiding your email addresses in your angular application from email crawlers, bots and harvesters while remaining visible to your visitors.

Demo

https://stackblitz.com/edit/ngx-email-obfuscation

Installation

Install the npm package

npm install ngx-email-obfuscation

Import NgxEmailObfuscationModule
import { NgxEmailObfuscationModule } from 'ngx-email-obfuscation';

@NgModule({
 imports: [
   ...
   NgxEmailObfuscationModule
 ]
})

Usage

Add emailObfuscation directive to the parent element of the email address.

Contact us at <span emailObfuscation>support@example.com</span>

Obfuscation

Using this directive, it will convert support@example.com to moc.elpmaxe@troppus` which is the reverse, it will use CSS to display the correct way.

On hovering over the email address it will be converted into an anchor tag with a mailto link.

Issues

Please report bugs and issues here.

License

MIT © Joe Jordan Brown