0.0.8 • Published 1 year ago
mfi-ngx-pipes v0.0.8
mfi-ngx-pipes
Angular utility library providing extra predefined pipes. Built on top of Angular 15.
Getting started
Installation
npm install mfi-ngx-pipes
Usage
- Import NgxPipes module or a signle pipe in your module or standalone component:
@NgModule({
...
imports: [NgxPipesModule],
})
or
@Component({
standalone: true,
...
imports: [PreventOrphansPipe],
})
in case of import error make sure the module is imported in the following way:
import { NgxPipesModule, PreventOrphansPipe } from 'mfi-ngx-pipes';
- Apply desired pipe for some value:
<p>{{ article | preventOrphans }}</p>
You may also add argumenets to selected pipes:
<p>{{ article | preventOrphans:myPattern }}</p>
export class AppComponent {
myPattern = /(\s+)((?:[\S][\s]+)+\S{2,})/g;
}
or
{{ 10 | countdown : 500 : false | async }}