npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hs-searchpage-angular

v1.1.6

Published

hoppysearch - AngularJS client for hoppysearch

Downloads

12

Readme

Angular Connector

hoppysearch - AngularJS client for hoppysearch

Experience the power of the HoppySearch Angular Connector/Plugin in your project. Effortlessly integrate search functionality within minutes, enhancing user experience with a beautifully designed search page or autocomplete feature. Streamline your Angular application with this versatile tool. Explore seamless incorporation of a fully developed search interface.

alt text

Installation

This project was generated with Angular CLI version 15.2.7.

For Angular.js

npm

Proceed with the installation by following these steps:

npm install hs-searchpage-angular --save

Getting Started

Please follow the installation instructions and execute the following AngularJS code:

Begin with the initial setup process:

  1. Run the following command to install the Angular CLI globally:

cmd

npm install -g @angular/cli
  1. Create a new Angular application using the following command:

cmd

ng new hs-searchpage
  1. Navigate to Your Project Directory

cmd

cd hs-searchpage
  1. Install the HoppySearch Angular Connector/Plugin

cmd

npm install hs-searchpage-angular
  1. Import the Connector/Plugin

    1. Open the src/app/app.module.ts file.

    2. Import the HsSearchpageAngularModule as shown below:

    TypeScript

    import { HsSearchpageAngularModule } from "hs-searchpage-angular";
    1. Add HsSearchpageAngularModule to the imports array:

    TypeScript

    @NgModule({
    ...
    imports: [
     ...
     HsSearchpageAngularModule
    ]
    })
  2. Add Material and Axios

    1. Integrate Angular Material into your project with the following command:

    cmd

    ng add @angular/material
    1. Install Axios using npm:

    cmd

    npm install axios
  3. Configure Your Component

    1. Open the src/app/app.component.ts file.

    2. Add the following properties to your component:

      TypeScript

       props = {
       indexId: "YOUR INDEX ID",
       apiKey: "YOUR READ/WRITE API KEY",
       primaryText: "",
       secondaryText: "",
       targetURL: "",
       iconURL: "",
       onTypeSearch: true
    
    };
    1. Customize these properties with your specific values. Refer Configuration Details to get idea of props.
  4. Update the HTML Template

    1. Open the src/app/app.component.html file.

    2. Replace the default code with the following:

    HTML

    <lib-hs-searchpage-angular hoppySearchConfig="props"></lib-hs-searchpage-angular>

Now, your Angular project is equipped with the HoppySearch Angular Connector/Plugin. You'll have a fully developed search page or autocomplete feature based on your configuration.

Configuration Details

Here's where to find the required information for configuration:

  • Visit the Indices page and select the index where you want to apply the connector.

  • indexId: Retrieve your index ID from your index endpoint. For example, if your index endpoint is (https://unm8df.hoppysearch.com) your index ID is "unm8df."

alt text

  • apiKey: In the Access Management -> API Keys section, you'll find the necessary API key (choose an API key with write permission).

alt text

  • onTypeSearch: Choose between "true" (automatic search as you type) or "false" (manual search by clicking the search button).

  • primaryText, secondaryText, targetURL, iconURL:Customize these fields according to your dataset.

You can modify these configurations to suit your dataset and project requirements.

For a visual step-by-step guide on integrating the HoppySearch Angular Connector/Plugin into your Angular project, watch this YouTube video.