Comparing version 1.0.0 to 1.0.1
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"devDependencies": { | ||
@@ -13,0 +13,0 @@ "@types/ejs": "^2.6.3", |
@@ -6,2 +6,4 @@ # client-packages | ||
You can See documentation of all methods available here: [https://api-docs.elevio.help/en/articles/89-how-to-install-elevio-via-npm](https://api-docs.elevio.help/en/articles/89-how-to-install-elevio-via-npm) | ||
## Usage | ||
@@ -61,4 +63,33 @@ | ||
#### Angular usage | ||
If you are using Angular it is required to use an NgZone so that Elevio doesn't interfere with Angular's change tracking. | ||
```js | ||
import { Component, NgZone } from '@angular/core'; | ||
@Component({ | ||
selector: 'app-elevio', | ||
templateUrl: './elevio.component.html', | ||
styleUrls: [] | ||
}) | ||
export class ElevioAndGridComponent { | ||
article: number; | ||
constructor(private _ngZone: NgZone) { } | ||
onClick() { | ||
this._ngZone.runOutsideAngular(() => { | ||
(window as any)._elev.openArticle(this.article); | ||
}); | ||
} | ||
} | ||
``` | ||
For more details see this article [ngZone.runOutsideAngular](https://medium.com/@krzysztof.grzybek89/how-runoutsideangular-might-reduce-change-detection-calls-in-your-app-6b4dab6e374d). | ||
### React usage | ||
You can view documentation of all available props here [https://api-docs.elevio.help/en/articles/90-how-to-integrate-elevio-into-react](https://api-docs.elevio.help/en/articles/90-how-to-integrate-elevio-into-react) | ||
Import the package | ||
@@ -78,4 +109,2 @@ | ||
You can also pass any `on` functions you like to get notified of when things occur. See [https://github.com/elevio/client-packages/blob/master/src/react.tsx](https://github.com/elevio/client-packages/blob/master/src/react.tsx) for the documentation of available props. | ||
**_NOTE_** | ||
@@ -82,0 +111,0 @@ you can also use a combination of the standard client usage if you want to do something imperative or something that isn't supported by the React wrapper. |
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
57445
11
0
154