UNPKG

ngx-whatsapp-button

Version:

Library to display a whastapp floating contact button on the user page

45 lines (31 loc) 1.08 kB
#NGX-WHATSAPP-BUTTON #### a floating whatsapp contact button to display in your app just run in your terminal&nbsp;inside &nbsp; your project : ```` npm install ngx-whatsapp-button ```` after that import&nbsp; the library &nbsp;in your app module ```` import { NgxWhastappButtonModule } from "ngx-whatsapp-button"; ```` added to your imports section ```` ... imports: [ NgxWhastappButtonModule ], ... ```` once imported the library needs to pass two @Input parameters - ngx-whatsapp-phone: &nbsp; the phone number where you want to receive the mesages - ngx-whatsapp-text:&nbsp; the default &nbsp;text you want to receive ###How to use it simply &nbsp;add the tags in the component html where you want to display&nbsp;it ```` <jjva-ngx-whatsapp-button [ngx_whatsapp_phone]="phone" [ngx_whatsapp_text]="title"></jjva-ngx-whatsapp-button> ```` and inside your component ts declare &nbsp;this two variables ```` public phone = "THE PHONE NUMBER IN INTERNATIONAL FORMAT WITHOUT THE PLUS SIGN" public title = "THE PRESET MESSAGE TO SEND"; ````