0.0.9 • Published 4 years ago

su-get-html v0.0.9

Weekly downloads
40
License
-
Repository
-
Last release
4 years ago

SearchUnify search client generator

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

Installation

Run npm install su-get-html to install the library.

How to use?

  • Include su-get-html module in app.module.ts:
import { SuModule } from 'su-get-html';

@NgModule({
declarations: [
    AppComponent
],
imports: [
    BrowserModule,
    AppRoutingModule,
    SuModule //<-- add the module in imports
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
  • Add the component where search client is expected in your application.

To brief the signatures of the components as below

  1. host - pass the url to the app | type: string
  2. uid - this is the uid of the searchclient | type: string

Sample implementation

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 { SuModule } from 'su-get-html';

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

app.component.html

This is a sample page.

<lib-su host="https://sampleUrl.com" uid="6de95369-218e"></lib-su>

app.component.ts

import { Component,Input,Output } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'angular-component-library';
}
0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago