Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

dhlab-basel/Knora-ui-search-builds

Repository files navigation

Knora-ui search module

npm (scoped)

This module is part of Knora-ui modules, developed by the team at the Data and Service Center for Humanities DaSCH.

Search module allows to make simple searches or extended searches in Knora. In extended search, resource class and its properties related to one specific ontology are selected to create your query.

Prerequisites

For help getting started with a new Angular app, check out the Angular CLI.

For existing apps, follow these steps to begin using Knora-ui search.

Install

You can use either the npm or yarn command-line tool to install packages. Use whichever is appropriate for your project in the examples below.

Yarn

$ yarn add @knora/search

NPM

$ npm install --save @knora/search

Dependencies

This module has the following package dependencies, which you also have to install.

  • @angular/common@6.0.0
  • @angular/core@6.0.0
  • @knora/core@6.0.0
  • @knora/viewer@6.0.0-alpha
  • jdnconvertiblecalendardateadapter@0.0.7

Components

This module contains various components like kui-search (a simple search bar) and kui-extended-search, which is already implemented in kui-search, but can also be used as a standalone component.

Setup

Import the search module in your app.module.ts and add it to the NgModules's imports:

import { AppComponent } from './app.component';
import { KuiSearchModule } from '@knora/search';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        KuiSearchModule
    ],
    providers: [ ],
    bootstrap: [AppComponent]
})
export class AppModule {
}