su-search
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

SearchUnify search client generator for Angular apps

Angular library for importing and generating a search client created inside a SearchUnify instance. This library accepts SearchUnify's instance name and uid to generate the search client in an Angular component. Published by the SearchUnify team.

Installation

Run npm install su-search to install the library.

Sample implementation - Search Client

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SuSearchModule } from 'su-search'; //<-- Import the module

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        AppRoutingModule,
        SuSearchModule //<-- Add the module in imports
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

app.component.html

  • Add the directive where search client is expected in your application.

Example:

<su-search instance="customer-name.searchunify.com" uid="6de95369-xxxxxxxx-xxxxxxxx-xxxxxxxx"></su-search>

Sample implementation - Search Box and autocomplete

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SuSearchModule } from 'su-search'; //<-- Import the module

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        AppRoutingModule,
        SearchBoxModule //<-- Add the module in imports
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

app.component.html

  • Add the directive where search client is expected in your application.

Example:

<search-box instance="customer-name.searchunify.com" uid="6de95369-xxxxxxxx-xxxxxxxx-xxxxxxxx"></search-box>

Required attributes

  1. instance - Host name of the customer SearchUnify instance | type: string
  2. uid - uid of the search client | type: string

Package Sidebar

Install

npm i su-search

Weekly Downloads

2

Version

0.1.4

License

MIT

Unpacked Size

157 kB

Total Files

29

Last publish

Collaborators

  • ankur.mahajan