0.0.4 • Published 12 months ago

@ngx-armory/pipes v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Table of contents

Installation

  1. Use npm to install the package
$ npm install @ngx-armory/pipes --save
  1. You could add to your standalone component or module a specific pipe such as IsNullPipe.
import {IsNullPipe} from '@ngx-armory/pipes';

@NgModule({
 // ...
 imports: [
   // ...
   IsNullPipe
 ]
})
import { IsNullPipe } from '@ngx-armory/pipes';

@Component({
  // ..
  standalone: true,
  imports: [IsNullPipe],
})
export class AppComponent {}
  1. Pipes are also injectable and can be used in Components / Services / etc..
import { IsNullPipe } from '@ngx-armory/pipes';

@Component({
  // ..
  providers: [IsNullPipe],
})
export class AppComponent {
  constructor(private isNullPipe: IsNullPipe) {
    const nullable = null;
    this.isNullPipe.transform(nullable); // Returns: true
  }
  // ..
}
  1. You can also use pipes as part of your template for ex.
<p>{{ "foo" | isNull }}</p>
<!-- Output: false -->

This library was generated with Nx.

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago