@oncehub/knowledgeowl-angular 4.1.8 → 4.1.10

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.
Files changed (2) hide show
  1. package/README.md +102 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,104 @@
1
- # KnowledgeOwl Angular
1
+ # knowledgeowl-angular
2
2
 
3
- The sources for this package are in the main [KnowledgeOwl Angular](https://github.com/scheduleonce/knowledgeowl-angular) repo. Please file issues and pull requests against that repo.
3
+ [![Build Status](https://travis-ci.org/scheduleonce/knowledgeowl-angular.svg?branch=master)](https://travis-ci.org/scheduleonce/knowledgeowl-angular)
4
+ [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
4
5
 
5
- License: MIT
6
+ Project that enables angular application to integrate KnowledgeOwl widget. This gives following features:
7
+
8
+ 1. Integrate KnowledgeOwl angular widget into application.
9
+ 2. Link HTML element to KnowledgeOwl article.
10
+
11
+ ## How to install?
12
+
13
+ You can use npm command line tool to install package.
14
+
15
+ ```sh
16
+ npm install knowledgeowl-angular
17
+ ```
18
+
19
+ ## How to use?
20
+
21
+ Import the Module:
22
+
23
+ ```sh
24
+ import {KnowledgeOwlWidgetModule, KnowledgeOwlLinkModule} from 'knowledgeowl-angular';
25
+
26
+ @NgModule({
27
+ ...
28
+ imports: [KnowledgeOwlWidgetModule, KnowledgeOwlLinkModule],
29
+ providers: [{provide: 'KOProjectURL', useValue: 'https://knowledgeowlurl.com'}]
30
+ ...
31
+ })
32
+ export class AppModule { }
33
+ ```
34
+
35
+ Add widget in app.component.html
36
+
37
+ ```sh
38
+ <knowledge-owl-widget
39
+ [projectKey]="'projectKeyProvidedByKnowledgeOwl'"
40
+ ></knowledge-owl-widget>
41
+ ```
42
+
43
+ ## How to link article to `<a>` or `button`?
44
+
45
+ ```sh
46
+ <a knowledgeOwlLink="test-article"></a>
47
+ ```
48
+
49
+ ## Directives
50
+
51
+ ### `KnowledgeOwlWidget`
52
+
53
+ Selector: `knowledge-owl-widget`
54
+
55
+ Exported as: `knowledgeOwlWidget`
56
+
57
+ ## Properties
58
+
59
+ | Name | Required | Description |
60
+ | ------------------------------------ | -------- | ---------------------------------------------- |
61
+ | @Input() <br/>`projectKey: string` | true | Product key to access KnowledgeOwl widget |
62
+ | @Input() <br/>`pageLocation: string` | false | Page location of application. Example "\start" |
63
+
64
+ ### Open the widget programmatically
65
+
66
+ The widget exposes an API to open/close programmatically.
67
+
68
+ ```sh
69
+ class MyComponent {
70
+ @ViewChild(KnowledgeOwlWidget) widget: KnowledgeOwlWidget;
71
+
72
+ someMethod() {
73
+ this.widget.open();
74
+ }
75
+ }
76
+ ```
77
+
78
+ ### Open the article in widget programmatically
79
+
80
+ The widget exposes an API to open/close widget with article programmatically.
81
+
82
+ ```sh
83
+ class MyComponent {
84
+ @ViewChild(KnowledgeOwlWidget) widget: KnowledgeOwlWidget;
85
+
86
+ someMethod() {
87
+ this.widget.open('article-name');
88
+ }
89
+ }
90
+ ```
91
+
92
+ ## Directives
93
+
94
+ ### `KnowledgeOwlLink`
95
+
96
+ Selector: `knowledgeOwlLink`
97
+
98
+ Exported as: `knowledgeOwlLink`
99
+
100
+ ## Properties
101
+
102
+ | Name | Required | Description |
103
+ | ---------------------------------------- | -------- | ------------------------- |
104
+ | @Input() <br/>`knowledgeOwlLink: string` | true | KnowledgeOwl Article Name |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oncehub/knowledgeowl-angular",
3
3
  "description": "KnowledgeOwl widget integration for Angular",
4
- "version": "4.1.8",
4
+ "version": "4.1.10",
5
5
  "author": "https://github.com/scheduleonce/knowledgeowl-angular/graphs/contributors",
6
6
  "repository": {
7
7
  "type": "git",