Gathering detailed insights and metrics for ng2-nested-search
Gathering detailed insights and metrics for ng2-nested-search
A simple component for nested search in your Angular 2,4,5 projects
npm install ng2-nested-search
Typescript
Module System
Node Version
NPM Version
68.9
Supply Chain
99.3
Quality
75.6
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
2,979
Last Day
1
Last Week
25
Last Month
74
Last Year
313
4 Commits
1 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.2.0
Package Id
ng2-nested-search@1.2.0
Unpacked Size
16.17 kB
Size
4.37 kB
File Count
14
NPM Version
6.14.6
Node Version
10.21.0
Cumulative downloads
Total Downloads
Last day
-85.7%
1
Compared to previous day
Last week
-26.5%
25
Compared to previous week
Last month
184.6%
74
Compared to previous month
Last year
-49.8%
313
Compared to previous year
2
A simple custom pipe for filtering arrays in your Angular 2 projects (works with Angular 4 and Angular 5 too) and get the count of filtered items. It supports nested search and you may search the array of items on specific properties.
import { NgModule } from '@angular/core';
import { ViewCharacters } from './view-characters';
import { FilterPipeModule } from 'ng2-nested-search';
@NgModule({
declarations: [
ViewCharacters
],
imports: [
FilterPipeModule
],
})
export class ViewCharactersModule {}
searchName : string = "";
searchFamily : string = "";
filterMetadata = { count: 0, isNestedSearch : true };
characters = [
{
name : "Daenerys",
family : "Targaryen",
gender : "Female"
},
{
name : "Jaime",
family : "Lannister",
gender : "Male"
},
{
name : "Sansa",
family : "Stark",
gender : "Female"
},
{
name : "Arya",
family : "Stark",
gender : "Female"
},
{
name : "Theon",
family : "Greyjoy",
gender : "Male"
}
]
<div style="text-align: center;">
<div style="display : inline-block; width : 48%">
<input style="width: 100%; padding: 13px; border-radius: 4px; border: 1px solid #ccc;" placeholder="Search By Family" [(ngModel)]="searchFamily"/>
</div>
<div style="display : inline-block; width : 48%">
<input style="width: 100%; padding: 13px; border-radius: 4px; border: 1px solid #ccc;" placeholder="Search By Name" [(ngModel)]="searchName"/>
</div>
</div>
<div style="padding : 8px 4px 0px 4px;">
<span>Total items filtered : </span>
<span [innerHTML]="filterMetadata.count"></span>
</div>
<div class="ttct-request" style="border: 1px solid #ccc;padding: 8px;margin: 8px;border-radius: 4px;" *ngFor="let character of characters | ng2NestedSearch: { 'name' : searchName, 'family' : searchFamily} : filterMetadata">
<div>
<span style="color: #888;">Name : </span>
<span [innerHTML]="character.name"></span>
</div>
<div>
<span style="color: #888;">Family : </span>
<span [innerHTML]="character.family"></span>
</div>
<div>
<span style="color: #888;">Gender : </span>
<span [innerHTML]="character.gender"></span>
</div>
</div>
searchText : string = "";
filterMetadata = { count: 0 };
<div style="text-align: center;">
<div style="display : inline-block; width : 100%">
<input style="width: 100%; padding: 13px; border-radius: 4px; border: 1px solid #ccc;" placeholder="Search" [(ngModel)]="searchText"/>
</div>
</div>
<div style="padding : 8px 4px 0px 4px;">
<span>Total items filtered : </span>
<span [innerHTML]="filterMetadata.count"></span>
</div>
<div class="ttct-request" style="border: 1px solid #ccc;padding: 8px;margin: 8px;border-radius: 4px;" *ngFor="let character of characters | ng2NestedSearch: { 'name' : searchText, 'family' : searchText} : filterMetadata">
<div>
<span style="color: #888;">Name : </span>
<span [innerHTML]="character.name"></span>
</div>
<div>
<span style="color: #888;">Family : </span>
<span [innerHTML]="character.family"></span>
</div>
<div>
<span style="color: #888;">Gender : </span>
<span [innerHTML]="character.gender"></span>
</div>
</div>
gmail : melwin.vincent.90@gmail.com
No vulnerabilities found.
No security vulnerabilities found.