0.5.0 • Published 1 year ago

ngx-freshchat v0.5.0

Weekly downloads
352
License
-
Repository
-
Last release
1 year ago

NgxFreshchat

Angular Wrapper for Freshchat js library. It requires Angular 6 or above.

Installation

Run npm install ngx-freshchat.

Import the library inside your desired module:

@NgModule({
    imports: [
        ...
        NgxFreshChatModule
        ...

Usage

Import the service and launch the init command:

constructor(private chat: NgxFreshChatService) {}

ngOnInit() {
    this.chat.init({
        token: YOUR_FC_TOKEN,
        host: YOUR_FC_URL
    })
    .subscribe(
        () => console.log('FreshChat is ready!')
    );
}

The library tries to mimic all the original properties and method names, but I made the methods respond with observables in order to allow checking the status of your requests. For more info please refer to the official documentation.

NB: The methods from the "user" object are mapped directly in the service. (i.e. window.fcWidget.user.setProperties() from the js is mapped as this.chat.setUserProperties() )

Contributions are welcome.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

0.5.0

1 year ago

0.4.0

2 years ago

0.2.0

4 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.4

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago