npm.io
3.17.5 • Published 3 months ago

@baloise/web-app-pipes-angular

Licence
Apache-2.0
Version
3.17.5
Deps
2
Size
73 kB
Vulns
0
Weekly
0
Stars
3

@baloise/web-app-pipes-angular

Continuous Release npm npm bundle size npm GitHub GitHub issues

Installation

npm install @baloise/web-app-pipes-angular

Add the pipe module to your app module.

import { NgModule } from '@angular/core'
import { BaloisePipeModule } from '@baloise/@baloise/web-app-pipes-angular'

import { AppComponent } from './app.component'

@NgModule({
  declarations: [AppComponent],
  imports: [BaloisePipeModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

Usage

The pipe functions are defined as Angular Pipes.

<span>{{ 'baloise' | balCapitalize }}</span>

The can be used in the component typescript file aswell.

import { Component } from '@angular/core'
import { balCapitalize } from '@baloise/web-app-pipes-angular'

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  capitalize(value: string) {
    return balCapitalize(value)
  }
}