# ng-intercom

> [![npm](https://img.shields.io/npm/v/ng-intercom.svg)](https://www.npmjs.com/package/ng-intercom) [![npm](https://img.shields.io/npm/dm/ng-intercom.svg)](https://www.npmjs.com/ng-intercom) [![Build status][ci-image]][ci-url] [![Maintenance](https://img.sh

Latest version **8.0.2** (published 2020-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-intercom
pnpm add ng-intercom
yarn add ng-intercom
bun add ng-intercom
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 8.0.2 |
| Published | 2020-01-27 |
| First published | 2017-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 8.0.0 |
| Dependencies | 1 |
| Unpacked size | 361.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 53 |
| Author | scott-wyatt |
| Maintainers | scottbwyatt, wbhob |
| Keywords | Intercom, Angular |

## Links

- npm: https://www.npmjs.com/package/ng-intercom
- Repository: https://github.com/CaliStyle/ng-intercom
- Homepage: https://github.com/CaliStyle/ng-intercom#readme
- Issues: https://github.com/CaliStyle/ng-intercom/issues
- npm.io page: https://npm.io/package/ng-intercom

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 8.0.2 (latest) — 2020-01-27
- 1.0.0-alpha.7 (beta) — 2017-07-30
- 8.0.1 — 2020-01-21
- 8.0.0 — 2019-07-02
- 8.0.0-beta.1 — 2019-04-26
- 7.0.1-beta.3 — 2019-03-22
- 7.0.1-beta.2 — 2019-03-11
- 7.0.0-beta.1 — 2018-12-05
- 7.0.0-beta.0 — 2018-11-12
- 6.0.0-beta.7 — 2018-10-25
- 6.0.0-beta.6 — 2018-10-13
- 6.0.0-beta.3 — 2018-08-14
- 6.0.0-beta.2 — 2018-07-03
- 6.0.0-beta.1 — 2018-05-30
- 1.0.0-beta.13 — 2018-03-25
- … 29 more at https://npm.io/package/ng-intercom/versions

## README

# ng-intercom

[![npm](https://img.shields.io/npm/v/ng-intercom.svg)](https://www.npmjs.com/package/ng-intercom)
[![npm](https://img.shields.io/npm/dm/ng-intercom.svg)](https://www.npmjs.com/ng-intercom)
[![Build status][ci-image]][ci-url]
[![Maintenance](https://img.shields.io/maintenance/yes/2019.svg)]()

This is an Intercom wrapper for Angular 2+ which supports AoT and SSR.

It intends to supports all documented intercom methods and PRs for functionality is greatly appreciated.

### BETA VERSION

`master` is now hosting the 7.0.0 beta version of `ng-intercom`. If you need to make changes to the latest stable version, please PR against `0.x.x`. If you need to use the last 0.x version, please run `npm install --save --save-exact ng-intercom@0.2`.

If you find issues with this version, please file an issue as soon as possible so we can take a look at it. We appreciate your cooperation!

### ALPHA VERSION
If you want to try the latest features, check out the 7.0.0-alpha branch! Features include automatic script loading and intercom directives! If you find an issue, please report it!

### Installation

This package is on NPM, so just run
 ```sh
$ npm install ng-intercom@latest --save
 ```

### Configuration

1. Import `IntercomModule` to `app.module.ts`. The module will automatically include the APP_ID instantiation, so you DO NOT need to copy the install script from Intercom and place it in your `index.html`.

```ts
import { IntercomModule } from 'ng-intercom';

@NgModule({
  imports: [
    ...
    IntercomModule.forRoot({
      appId: <your_app_id>, // from your Intercom config
      updateOnRouterChange: true // will automatically run `update` on router event changes. Default: `false`
    })
    ...
  ]
})
export class AppModule { }
```

2. Use in your components/directives/whatever you want!

```ts
// App
import { Component, OnInit } from '@angular/core';
import { Intercom } from 'ng-intercom';

@Component({
  selector: 'app',
  template: `...`
})
export class AppComponent implements OnInit {
  constructor(
    public intercom: Intercom
  ){}

  ngOnInit() {
    this.intercom.boot({
      app_id: <app_id>,
      // Supports all optional configuration.
      widget: {
        "activator": "#intercom" 
      }
    });
  }
}
```

### Development
To run live testing: `ng test`

To run tests: `npm test`

To run distribution: `npm run build:dist`

To publish `npm run build:dist && npm publish dist`


### Credits
Maintained by [Scott Wyatt](https://github.com/scott-wyatt) and [Wilson Hobbs](https://www.twitter.com/wbhob) in 2017 with contributions from [Florian Reifschneider](https://github.com/flore2003), [Devon Sams](https://www.twitter.com/POS1TRON), [Humberto Rocha](https://github.com/humrochagf), and [Luca GOUTY](http://luca.gouty.fr)


[ci-image]: https://img.shields.io/circleci/project/github/CaliStyle/ng-intercom/master.svg
[ci-url]: https://circleci.com/gh/CaliStyle/ng-intercom/tree/master

---
_Source: https://npm.io/package/ng-intercom · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
