# ng-filter-list

> Angular 4 toggleable menu with any level of submenus

Latest version **0.3.9** (published 2017-11-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-filter-list
pnpm add ng-filter-list
yarn add ng-filter-list
bun add ng-filter-list
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.9 |
| Published | 2017-11-23 |
| First published | 2017-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Serra Allgood |
| Maintainers | serracorwin |
| Keywords | Angular4, filters, menu |

## Links

- npm: https://www.npmjs.com/package/ng-filter-list
- Repository: https://github.com/serracorwin/filter-list
- npm.io page: https://npm.io/package/ng-filter-list

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.76

## Recent versions

- 0.3.9 (latest) — 2017-11-23
- 0.3.8 — 2017-11-22
- 0.3.7 — 2017-10-17
- 0.3.6 — 2017-10-16
- 0.3.5 — 2017-10-16
- 0.3.4 — 2017-10-16
- 0.3.3 — 2017-10-13
- 0.3.2 — 2017-10-13
- 0.3.1 — 2017-10-13
- 0.3.0 — 2017-10-13
- 0.2.2 — 2017-10-13
- 0.2.1 — 2017-10-13
- 0.1.29 — 2017-10-13
- 0.1.28 — 2017-10-13
- 0.1.27 — 2017-10-10
- … 26 more at https://npm.io/package/ng-filter-list/versions

## README

# NgFilterList

## Description
Toggleable Menu with any number of submenus. Meant to be used with @ngrx/store,
so that the toggled menu state is remembered between page changes. Optional
dependency on Font Awesome for some togge indicators for the menu, which you'll
have to include in your project yourself.

## Installation
To install this component to an external project, follow this procedure:
1. __npm install ng-filter-list --save__ or __yarn add ng-filter-list__
2. Add __NgFilterListModule.forRoot()__ import to your __@NgModule__ like below
    ```js
    import { NgModule } from '@angular/core'
    import { BrowserModule } from '@angular/platform-browser'
    import { NgFilterListModule } from 'ng-filter-list'
    import { AppComponent } from './app.component'

    @NgModule({
      imports: [
        BrowserModule,
        NgFilterListModule.forRoot()
      ],
      declarations: [AppComponent],
      bootstrap: [AppComponent]
    })
    export class AppModule {}
    ```

## Usage
The __<ng-filter-list>__ component takes a `[menus]` input that's an __Array<Menu>__ and the exported __Menu__ interface is
defined as:
    ```js
    interface Menu {
      name: string;
      filters: Array<string>;
      subMenus: Array<Menu>;
    }
    ```

The component outputs a __FilterToggleEvent__, which is also exported, defined as:
    ```js
    interface FilterToggleEvent {
      menu: string;
      filters: Array<string>;
      toggle: boolean;
    }
    ```
So if a user collapses an entire menu of toggles, only one event is emitted.

## License
License: MIT

## Author
Serra Allgood

---
_Source: https://npm.io/package/ng-filter-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
