0.0.13 • Published 7 years ago

ng-hotjar v0.0.13

Weekly downloads
86
License
MIT
Repository
-
Last release
7 years ago

Build Status

Travis Build Status

Install

npm install --save ng-hotjar

Import

import { NgModule } from '@angular/core';

import { HotjarModule } from 'ng-hotjar';

@NgModule({
    ...
    imports: [
        HotjarModule,
        ...
    ]
    ...
})
export class AppModule {}

Instantiate Component

<hotjar tracking-id="xxxxxx" version="6"></hotjar>

Inject Service

import { Component } from '@angular/core';
import { HotjarService } from 'ng-hotjar';

/**
 * App Component
 * Top Level Component
 */
@Component({
    selector: 'my-app',
    template: `
        <div>
            <h1>My Component</h1>
            <button (click)="trigerPoll()">Trigger Poll</button>
        </div>
    `
})
export class AppComponent {

    constructor(hotjarService: HotjarService) {}

    public triggerPoll() {
        this.hotjarService.trigger('myPoll');
    }

}
0.0.13

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago