npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-zendesk-webwidget-6

v0.1.5

Published

[![Dependency Status](https://dependencyci.com/github/AlisonVilela/ngx-zendesk-webwidget/badge)](https://dependencyci.com/github/AlisonVilela/ngx-zendesk-webwidget) [![Maintainability](https://api.codeclimate.com/v1/badges/75bc5877b3bf6939fe44/maintainabi

Downloads

15

Readme

Dependency Status Maintainability Build Status contributions welcome Join the chat at https://gitter.im/ngx-zendesk-webwidget/Lobby

ngx-zendesk-webwidget

Zendesk-Webwidget for Angular 2+

Zendesk-Webwidget for Angular 1.x see here

Installation

Via npm:

$ npm install ngx-zendesk-webwidget --save

Usage

1. Import the ngxZendeskWebwidgetModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { ngxZendeskWebwidgetModule } from 'ngx-zendesk-webwidget';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    ngxZendeskWebwidgetModule.forRoot()
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
SharedModule
@NgModule({
    exports: [
        CommonModule,
        ngxZendeskWebwidgetModule
    ]
})
export class SharedModule { }
Configuration
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';

import {ngxZendeskWebwidgetModule, ngxZendeskWebwidgetConfig} from 'ngx-zendesk-webwidget';

import {AppComponent} from './app';

export class ZendeskConfig extends ngxZendeskWebwidgetConfig {
  accountUrl = 'yourdomain.zendesk.com';
  beforePageLoad(zE) {
    zE.setLocale('en');
    zE.hide();
  }
}

@NgModule({
    imports: [
        BrowserModule,
        HttpClientModule,
        ngxZendeskWebwidgetModule.forRoot(ZendeskConfig)
    ],
    bootstrap: [AppComponent]
})
export class AppModule { }

2. Init the ngxZendeskWebwidgetService for your application:

import { ngxZendeskWebwidgetService } from 'ngx-zendesk-webwidget';

@Component({
  selector: 'app',
  templateUrl: './app.html'
})
export class app {

  constructor(private _ngxZendeskWebwidgetService: ngxZendeskWebwidgetService) {
  }
}

3. Example to usage:

  constructor(private _ngxZendeskWebwidgetService: ngxZendeskWebwidgetService) {
    _ngxZendeskWebwidgetService.identify({
     name: 'Alison Vilela',
     email: '[email protected]'
    })
    _ngxZendeskWebwidgetService.show()
  }

  logout(){
    _ngxZendeskWebwidgetService.hide()
  }
}

API

ngxZendeskWebwidgetService

Methods:

  • setLocale(locale): Set locale to change language.
  • identify(userObj): If your user is signed in, you can use this methods for to pass the details of that user to your Zendesk.
  • hide(): The method completely hides all parts of the Widget from the page.
  • show(): The method displays the Widget on the host page in its starting 'button' state.
  • activate(options): The method activates and opens the Widget in its starting state.
  • setHelpCenterSuggestions(options): The method enhances the contextual help provided by the Web Widget.
  • setSettings(settings): The method sets window.zESettings.

For more info, see: ZendeskAPI

ngxZendeskWebwidgetConfig:

  • accountUrl: Url of your domain (example.zendesk.com)
  • beforePageLoad: Callback, executed after Zendesk loaded

Issues

Please report bugs and issues here.

License

MIT © Alison Vilela

Change log

v0.1.3

  • Support Angular 5

v0.1.2

  • Added custom settings

v0.1.1

  • Change documentation

v0.1.0

  • Added documentation
  • Initial version