ngx-pendo 1.4.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -78
- package/bundles/ngx-pendo.umd.js +576 -555
- package/bundles/ngx-pendo.umd.js.map +1 -1
- package/esm2015/lib/ngx-pendo-id.directive.js +47 -43
- package/esm2015/lib/ngx-pendo-section.directive.js +45 -45
- package/esm2015/lib/ngx-pendo.component.js +18 -18
- package/esm2015/lib/ngx-pendo.injectors.js +45 -46
- package/esm2015/lib/ngx-pendo.interfaces.js +2 -1
- package/esm2015/lib/ngx-pendo.module.js +45 -45
- package/esm2015/lib/ngx-pendo.service.js +39 -36
- package/esm2015/ngx-pendo.js +4 -4
- package/esm2015/public-api.js +11 -11
- package/fesm2015/ngx-pendo.js +213 -208
- package/fesm2015/ngx-pendo.js.map +1 -1
- package/lib/ngx-pendo-id.directive.d.ts +16 -16
- package/lib/ngx-pendo-section.directive.d.ts +16 -16
- package/lib/ngx-pendo.component.d.ts +5 -5
- package/lib/ngx-pendo.injectors.d.ts +5 -5
- package/lib/ngx-pendo.interfaces.d.ts +17 -17
- package/lib/ngx-pendo.module.d.ts +6 -6
- package/lib/ngx-pendo.service.d.ts +23 -23
- package/ngx-pendo.d.ts +4 -4
- package/ngx-pendo.metadata.json +1 -1
- package/package.json +5 -4
- package/public-api.d.ts +7 -7
- package/schematics/collection.json +11 -0
- package/schematics/ng-add/index.d.ts +2 -0
- package/schematics/ng-add/index.js +106 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/index.spec.d.ts +1 -0
- package/schematics/ng-add/index.spec.js +47 -0
- package/schematics/ng-add/index.spec.js.map +1 -0
- package/schematics/ng-add/schema.json +24 -0
- package/CHANGELOG.md +0 -37
- package/bundles/ngx-pendo.umd.min.js +0 -16
- package/bundles/ngx-pendo.umd.min.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,78 +1,110 @@
|
|
|
1
|
-
# Ngx Pendo
|
|
2
|
-
|
|
3
|
-
An easy implementation pendo on angular6+ apps.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/ngx-pendo)
|
|
6
|
-
[](https://travis-ci.org/yociduo/ngx-pendo)
|
|
7
|
-
[](https://github.com/yociduo/ngx-pendo/blob/master/LICENSE)
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
# Ngx Pendo
|
|
2
|
+
|
|
3
|
+
An easy implementation pendo on angular6+ apps.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/ngx-pendo)
|
|
6
|
+
[](https://travis-ci.org/yociduo/ngx-pendo)
|
|
7
|
+
[](https://github.com/yociduo/ngx-pendo/blob/master/LICENSE)
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
### npm
|
|
12
|
+
|
|
13
|
+
If you use npm:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
npm install ngx-pendo
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### yarn
|
|
20
|
+
|
|
21
|
+
If you use yarn:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
yarn add ngx-pendo
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### schematics
|
|
28
|
+
|
|
29
|
+
Use the Angular CLI's install [schematics](https://angular.io/guide/schematics) to set up [ngx-pendo](https://www.npmjs.com/package/ngx-pendo) by running the following command:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
ng add ngx-pendo
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The `ng add` command will install [ngx-pendo](https://www.npmjs.com/package/ngx-pendo) and ask you the following question:
|
|
36
|
+
|
|
37
|
+
1. Please enter Pendo Api Key: <br/> You must enter Pendo Api Key
|
|
38
|
+
|
|
39
|
+
The `ng add` command will additionally perform the following configurations:
|
|
40
|
+
|
|
41
|
+
* Add `ngx-pendo` to *package.json*
|
|
42
|
+
* Auto import `NgxPendoModule` with *pendoApiKey* into `AppModule`
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
> This feature need angular 11+.
|
|
46
|
+
|
|
47
|
+
## Feedbacks
|
|
48
|
+
|
|
49
|
+
https://github.com/yociduo/ngx-pendo/issues
|
|
50
|
+
|
|
51
|
+
## Simple Configuration
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { NgxPendoModule } from 'ngx-pendo';
|
|
55
|
+
|
|
56
|
+
@NgModule({
|
|
57
|
+
declarations: [
|
|
58
|
+
AppComponent
|
|
59
|
+
],
|
|
60
|
+
imports: [
|
|
61
|
+
BrowserModule,
|
|
62
|
+
NgxPendoModule.forRoot({
|
|
63
|
+
pendoApiKey: 'pendo-api-key',
|
|
64
|
+
pendoIdFormatter: (value: any) => value.toString().toLowerCase()
|
|
65
|
+
})
|
|
66
|
+
],
|
|
67
|
+
providers: [],
|
|
68
|
+
bootstrap: [AppComponent]
|
|
69
|
+
})
|
|
70
|
+
export class AppModule { }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Call Initialization
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import { Component, OnInit } from '@angular/core';
|
|
77
|
+
import { NgxPendoService } from 'ngx-pendo';
|
|
78
|
+
|
|
79
|
+
@Component( ... )
|
|
80
|
+
export class AppComponent implements OnInit {
|
|
81
|
+
|
|
82
|
+
constructor(protected ngxPendoService: NgxPendoService) {
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
ngOnInit() {
|
|
86
|
+
this.ngxPendoService.initialize({
|
|
87
|
+
id: 'PUT_VISITOR_ID_HERE',
|
|
88
|
+
name: 'Neo',
|
|
89
|
+
email: 'neo@thematrix.io',
|
|
90
|
+
role: 'godlike'
|
|
91
|
+
}, {
|
|
92
|
+
id: 'PUT_ACCOUNT_ID_HERE',
|
|
93
|
+
name: 'CorpSchmorp'
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Pendo Directives
|
|
101
|
+
|
|
102
|
+
You can use angular directives to add pendo id.
|
|
103
|
+
|
|
104
|
+
### Simple directive use
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
<div ngx-pendo-section="section">
|
|
108
|
+
<button ngx-pendo-id="click_test">Click Test</button>
|
|
109
|
+
</div>
|
|
110
|
+
```
|