@oncehub/knowledgeowl-angular
TypeScript icon, indicating that this package has built-in type declarations

4.1.11 • Public • Published

knowledgeowl-angular

Build status

Project that enables angular application to integrate KnowledgeOwl widget. This gives following features:

  1. Integrate KnowledgeOwl angular widget into application.
  2. Link HTML element to KnowledgeOwl article.

How to install?

You can use npm command line tool to install package.

npm install @oncehub/knowledgeowl-angular

How to use?

Import the Module:

import {KnowledgeOwlWidgetModule, KnowledgeOwlLinkModule} from '@oncehub/knowledgeowl-angular';

@NgModule({
  ...
  imports: [KnowledgeOwlWidgetModule, KnowledgeOwlLinkModule],
  providers: [{provide: 'KOProjectURL', useValue: 'https://knowledgeowlurl.com'}]
  ...
})
export class AppModule { }

Add widget in app.component.html

<knowledge-owl-widget
    [projectKey]="'projectKeyProvidedByKnowledgeOwl'"
></knowledge-owl-widget>

How to link article to <a> or button?

<a knowledgeOwlLink="test-article"></a>

Directives

KnowledgeOwlWidget

Selector: knowledge-owl-widget

Exported as: knowledgeOwlWidget

Properties

Name Required Description
@Input()
projectKey: string
true Product key to access KnowledgeOwl widget
@Input()
pageLocation: string
false Page location of application. Example "\start"

Open the widget programmatically

The widget exposes an API to open/close programmatically.

class MyComponent {
  @ViewChild(KnowledgeOwlWidget) widget: KnowledgeOwlWidget;

  someMethod() {
    this.widget.open();
  }
}

Open the article in widget programmatically

The widget exposes an API to open/close widget with article programmatically.

class MyComponent {
  @ViewChild(KnowledgeOwlWidget) widget: KnowledgeOwlWidget;

  someMethod() {
    this.widget.open('article-name');
  }
}

Directives

Selector: knowledgeOwlLink

Exported as: knowledgeOwlLink

Properties

Name Required Description
@Input()
knowledgeOwlLink: string
true KnowledgeOwl Article Name

Development

Package is automatically pushed to npm when creating a new release on Github. Check out the release section in the repo. Read more about releases here.

License

This module is licensed under the MIT License. See the LICENSE file for details.

Readme

Keywords

none

Package Sidebar

Install

npm i @oncehub/knowledgeowl-angular

Weekly Downloads

1

Version

4.1.11

License

none

Unpacked Size

93.3 kB

Total Files

28

Last publish

Collaborators

  • oncehub.admin