- [#77] - Upgrade to Angular 8
Now $or
can filter with multiple predicates
class AppComponent {
objects = [{ name: 'John' }, { firstName: 'John' }];
constructor(private filter: FilterPipe) {
let result = this.filter.transform(this.objects, {
$or: [{ name: 'John' }, { firstName: 'John' }],
});
console.log(result); // [{ name: 'John' }, { firstName: 'John' }]
}
}
- [#55] - Made pipe impure to detect changes in arrays and objects
- [#54] - Change detection not firing with object
Bundle location is changed, therefore SYSTEMJS config should be updated
Append to map
var map = {
...
'ngx-filter-pipe': 'node_modules/ngx-filter-pipe/bundles'
}
and then add to packages
var packages = {
...
'ngx-filter-pipe': { defaultExtension: 'js' }
}
- [#50] - How to call filterPipe transform from Component ?
Inject FilterPipe
into your component and use it:
class AppComponent {
objects = [{ name: 'John' }, { name: 'Nick' }, { name: 'Jane' }];
constructor(private filter: FilterPipe) {
let result = this.filter.transform(this.objects, { name: 'J' });
console.log(result); // [{ name: 'John' }, { name: 'Jane' }]
}
}
- [#46] - Filter by property/method on prototype chain.
- [#47] - walk the prototype chain to check if field/property exists.
- Module name was changed from
Ng2FilterPipeModule
toFilterPipeModule
. - UMD bundle for
SYSTEMJS
was added. Use/dist/bundles/ngx-filter-pipe.umd.js
instead of/dist/index.js
.
- [#32] - Filter fails when filter value is zero
- Removed warning in Angular 4+
- [#28] - Filter number by string
- Removed post install script
- [#24] - Ability to pass in a function as a filter
- [#15] - Filter by object key which can be equals null
- [#17] - Can't filter by getter properties of classes
- [#14] - sh: typings: command not found
- [#11] - Fix filter by object bug
- [#7] - Fails if trying to filter null
Now instead of declaring pipe you need to import Ng2FilterPipeModule
to your module
@NgModule({
imports: [BrowserModule, Ng2FilterPipeModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
- [#6] - Update to Angular RC6
- Removed version lock from peer dependency
@angular/core
- [#2] - updated @angular/core to RC.5
- Case insensitive string filtering
- Added simple typings file
- Changed main file in package